Set Column Values after Form submit

I’m trying to add a Set Column Values on This Item, as an On Submit action after a Form. The idea is to set a bunch of default values for columns the user doesn’t need to modify.

I can’t make this work as my changes don’t seem to apply. Any ideas why ?

1 Like

I’ve always been skeptical of that working reliability when adding a new row, but others have said that it should work. I’m not really sure.

You could always add Screen Value Components to pass values through the form without the user seeing them.

1 Like

Yes, it’s just that I had 15 column values to force and adding them through a Set Column Values seemed a lot easier.

I can confirm that it doesn’t work… :frowning:

2 Likes

Does the target table have a Row ID? If not then add one and try again.

1 Like

@V88 Yes, it does, so that’s not the reason it doesn’t work…

That’s a shame. It’s the only time I’ve ever seen this particular scenario not work.

Could it be due to the fact that I’m trying it in Glide Pages and not Glide Apps ?

I’m running into other weird issues such as visibility settings in Forms not working correctly. I posted another Topic with video about that one…

I’ve tried a bunch of stuff…

a) Do Set Column Values on This Item. In fact adding another Action behind that one never completes, so it looks like somehow the Set Column Values crashes silently…

b) I have a Relation to another Sheet, and I tried to do a Set Column Value on that relation (something I’ve done in the past without a problem in Glide Apps). This one too doesn’t set anything, but it doesn’t crash as the Action after it completes…

c) I’ve done Copy to Clipboard action to see if the relation column works, and lo and behold it does, I have correct values in the Clipboard…

So I’m confused and wondering if something is wrong with Set Column Values in Glide Pages…

I’m not sure about the reliability of that since the row might not be created in time, I did have problems with this same thing in the past, so I would always suggest using screen values, whether it be Apps or Pages @Killko

2 Likes

Yes I gave up on that, and just created a one line Table with User Specific Values for each column in the Original Table, then built my own New Screen. Works like a charm… :slightly_smiling_face:

That also solved my problem with setting item visibility in a Form since I just didn’t use one.
However, I still think there is a bug there in Show Form…

This could certainly be the issue—I’ve noticed this inconsistency before with Glide Pages…

2 Likes

Having run some tests, and always using a table with a Row ID, I cannot repeat this and indeed I use the technique in several projects, both “apps” and “pages”, successfully. However, echoing @Robert_Petitto comment, there certainly was a time when it was a little unstable on Pages. I know it’s a pain, but have you tried creating a new action from scratch, just in case?

1 Like

Hi @V88 Yes I tried that to no avail.
But I also had problems managing visibility of items based on original screen values or changes in the Form, and last but not least, I couldn’t set the default value of choice components in a Form.

So I decided to manage my own Custom Form with a Show New Screen Action, which solves all the above. :slightly_smiling_face:

1 Like

Yup. The default choice value is a pain :roll_eyes: however glad to see you have a workaround. Onwards :muscle: to victory!

1 Like

I’m using a Glide app and have the same issue. In my case, I’m trying to automatically update a column/field that is designated as a row owner column. The idea is that once a user adds a record, it will insert their email address automatically into this owner field so that the user can see the records they have added to the database. It seems to work initially as the app will display the item that was just added by the current user, but then when I check the table, the row owner column for the record I just added is blank. Eventually the item that I just added will disappear from the user’s screen because there is no owner identified.

Right…you have to add row owners as part of the form submission, not afterwards. Reason is because the person who created the row won’t have access to the row they just created!

I’m not following you. I am attempting to add the owner behind the scenes by using an update column action on submit. Are you saying that can’t be done? If not, how do you go about automatically assigning the current user as the owner of a record that gets added by that user. This seems to be a pretty straightforward use case but I can’t find any documentation on how to do this.

Don’t use On Submit. Instead, add the appropriate Special Value component to your form.

3 Likes

What Jeff said. You can still pass the value “behind the scenes” but you’ll need to make sure that value is available to the user (either as a template columns or single value or …) as part of the form submission.

3 Likes

Thanks Jeff. It makes sense now. Was unaware of the special field components and ability to map those to a database field.

2 Likes