I’m building a mobile app focused focused around a user’s Members of Congress.
While signing up, I’m having the user choose their own Representative through a drop-down menu (filtered by their state), but how can I use the user’s state to automatically choose/add their two Senators? (i.e. when the State record is submitted, it can automatically add the two Senators using the User’s state)
Another piece of knowledge - I have 3 interconnected databases: users + Members of Congress + states. Users are associated to a state, and Members of Congress are associated to a state. Since there are 2 types of Members of Congress, I just used True/False (True = Senator, False = Representative).
TLDR: To eliminate a signup step, is there a way to use the User’s state to automatically add their Senators? I’ve been researching for a minute, but having trouble on how to accomplish this. Thanks!
EDIT: for those outside of the US, every citizen has 3 Members of Congress = 2 Senators that are the same for everyone in the same state + 1 Representative that is dependent on district/region within the state.