Set Column action not working in edit forms

Set columns action is not working when in an edit form.

I’ve tried in multiple apps on multiple sheets and multiple tables, even just starting a new app and adding one Glide table to test it. It’s not unique to my production app.

I’ve already been told twice that a fix was shipped in support tickets, of which I was not updated and I had to chase. After informing them that the fix was not effective in any of my examples, I was told to take another video and raise yet another ticket…

It’s really frustrating, has anyone else run into this problem? Did they find out what was wrong? Did you find a solution? Do I really have to take a third video to get the same point across?

Thanks

2 Likes

Can you explain your case a little bit? Are you setting a column on the same row you are editing? Are you setting a column through a single relation, and if so, are you editing a value that would affect the relation that you are trying to set the column through?

If you can share a version of your test app that can be copied, that might help for the rest of us to look at it instead of trying to do a bunch of back and forth to get a better understanding.

I can potentially see issues if you are trying to set a column value through a relation before that relation makes it’s connection. It seems that actions fire off really quickly, so timing could be a big issue here.

2 Likes

That’s an example.

To go into more detail, when you enter the edit form for a row in the inline list, and on the submit action of that edit form you choose “set columns” and select “this item” for the row (not talking about relations here)

If I enter manual data to the columns, it only wants to write them if the column already has data. It won’t set a new value if it is first empty. What’s also strange is that if I go the data table and enter some data, then immediately remove it. When I got back to the edit form and perform the submit action, it starts working. This behaviour is row-specific…

If i clear the rows, leave and re-enter the app, back to square one.

Just had a play around with that and yeah, the behaviour is just bizarre.
I’ve never seen that before (but then, I never use the native add/edit form functionality), but it definitely looks buggy. Sorry I can’t offer anything more, perhaps Jeff will provide a bit more insight once he takes a look.

Yeah, definitely see that same issue. Interestingly, it’s even worse in the published version. Even with the column already populated with something different, such as ‘xxx’ and submitting an edit with a description change, the description will update in the data, but the yes/no columns will not update. This definitely does seems like a bug. I had/have a somewhat similar issue in one my other apps, but in that case I’m filling user specific columns, so I assumed it was only a user specific column issue. In that case it worked fine in the builder, but the published version seemed to be a step behind and populated certain columns with old values that had already been changed to new values. Hard to explain, as it’s a bit complicated of an app, but I explain it more here: Set Column Bugs. I can’t retest my app at the moment due to another bug with IF columns that I found.

I tried a few different things, which seemed to make it work in the builder, but the published version still wouldn’t work correctly. I switched to a custom action and tried with clears to those columns followed by setting them. I also tried setting them to yes/no twice, but no luck. Even with the columns already populated, it just wouldn’t bring them back to the server database. I think there has always been something off with the Set Column action in a Add/Edit/Form screen and I usually try to avoid using it there. I think there gets to be some weird sync issues when you are trying to update a row twice within a split second.

Instead, as a workaround solution (previously the only solution prior to having any onSubmit actions) is to instead create some template yes/no columns in your user profile sheet. Then you can simply pass those user profile column values through the Edit (or Add, or Form) screens. That method has always worked reliably and you are only making one update to the row instead of two.

These are the template columns that are created in the user profile table.
image

These are the user profile columns being passed through and set to fill your yes/no columns.
image


imageimage

If you ever had a situation where you didn’t have a user profile sheet, then you could instead place the template columns in the same table you are editing or in the table that drive a form (not the destination table of the form). Then you can pass the template values through the Screen Column values.

image


So yes, I would say that this is a bug, or at least not working as one would expect it to, but at least there are alternatives to keep you moving.

3 Likes