Action to Update a column doesn't update the relationship based on that column

Hi,

I’m fairly new to Glide Apps, I’m very impressed with what I have been able to get up and running so far. I have come across some functionality I can’t quite solve and am looking for suggestions.

I am on a Campaigns edit screen, campaigns is related to client with the client ID stamped in the campaigns table and a relationship set based on that column. From the campaigns detail screen I want to open the details screen of the client, easy enough to do by using show detail screen for the relationship column. However if the user changes the client then this isn’t stored in the table and therefore the button takes them to the details of the old client rather than the new.

I thought I could get round this by setting the client ID against the user profile row, then in the action setting the client ID in the campaigns table using set column values then show details page for the relationship column. This correctly updates the client ID column in the campaign table, but it doesn’t seem to effect the relationship immediately / at all / until the form is submitted. Is there something I’m missing or another way to achieve this?

Any help appreciated,

Thanks

Sounds like maybe you need to add an if then else in there? If other user is selected, then other user, else default user. Relate from the if then else column to the users table?

What do you mean here by “the user changes the client”? How is this currently done in the app?

The user has a choice component, currently linked to a user specific field but had previously been directly linked to the clientID field in campaigns. So if they update that, it’s not stored in the campaigns table and therefore the button to view client details is still using the value prior to the change. Using set column values as part of the action on the view client details button updates it correctly but this isn’t reflected in the relationship that’s dependent on it, so the second action to view details of the related data still shows the original client.

Some screen shots of the relevant data tables showing the columns in question would be useful to help visualise the issue.

1 Like