Pass additonal values to "Show New Screen"

My scenario is sort of convoluted.

I have a list of cities. When you click on that City, I want to take to to the details for it.
Then inside that city I have two “Show New Screen” buttons, one that points to a “Relation” of Businesses, and the other that points to a “Relation” of Events.

Once I click either button, I’m presented with the list of Businesses/Events respectively.

These lists need to allow the user to “Add New”, and they do, however when I do, I’ve lost fidelity into the “CityId”, There is no payload passed to the “Add New” button aside from the user details.

One thing I tried (unsuccessfully) is to updat the user table with their last_viewed_city_id when they view a city, but I can’t seem to be able to update the user in that way, in fact the only thing “Set Column Values” lets me mutate is the would be the city itself.

Is there a way to either

a) pass the CityId from the City Details page all the way through to the Add new business page
b) modify the user record with their last known city when they select a city?
- note: I don’t want to add a new value to a new row as I think I could very quickly hit my 25,000 row cap.

I’m kind of at a loss here and am not sure how to proceed.

What you need to do here is create a single relation between your current table and your users table. Do this as follows:

  • Add a template column in the current table containing the UserID of the signed in user
  • Use this to create the relation (make sure it’s a single relation)

With this in place, you should be able to use Set Column Values in your action on any column in your user table through that single relation.

1 Like

Another thing that I like to do is, instead of using Show New Screen → Relation, I use Show New Screen → This Item, which gives you a new screen for the city row. On that screen you could add an inline list that uses the relation to show the businesses. Then you can add a button or floating button that opens a form to add a new business. In that you will still have access to the city data since you are still on the city row.


I think this solution will have some legs! I’m going to give it a try, thank you!

1 Like

ah, yes - of course. I missed that!

1 Like

That did it, thank you!
Now if only I didn’t have to completely rebuild my layouts for the bazillionth time :frowning:

1 Like

You can always copy and paste components between screens to save some time. :wink: