Hardcode Custom Variable in a Form

What is the best way to add a custom value to a column in a form?

E.g. Column X is given a value when user submits the form.

  • Is this possible with a type of component in a form? (simplest)
  • Or do I need to try to do it with Action Workflows - Column Set function?

Thanks for any thoughts.

It depends what you’re trying to add. If it’s a value from the user’s profile, you can easily grab any user profile columns and pass them through on form submit. The same can be true for values from the previous screen.

If you’re trying to add something else, IFTHEN columns that are tied to the responses in another column may be all you need.

More information is needed though as there are a lot of possible answers to this question!

1 Like

@shchc thanks for response.

Unfortunately the info isn’t available in any other columns/ fields in the database.

Thus why I’m not looking to use (screen columns or User columns functionality)

Does that help clarify?

In a perfect scenario, how do you imagine this could/should work? That may help clarify further.

@shchc on a form page, I would be able to add a ‘hidden component’ and set it to add to a Column with a Custom Value.

Is the custom value always the same? Does it need to pass through to a Google sheet?

If it’s just a static value that gets added to each row and doesn’t need to get passed to a Google sheet, a template column could easily do this.

If it’s something dynamic that is based on a previous response in the form, you can either use IFTHEN columns to add a value to each row that depends on the conditions of the IFTHEN, or use a custom action.

Here’s the scenario to give you the full view:

  1. I’m using one table (google sheet) with multiple forms (it’s a NOTES table)
  2. However, there are notes of different types (A, B, C)
  3. Each form is for one of these types (A, B, C)
  4. So each form needs to set the type (as a hidden hardcoded field) into this one large NOTES table (sheet). Thus looking for a form based hidden custom variable I can add.

Neither template/ nor if/ then can do this - since IF/THEN does not allow an IF condition based on the form you’re using.

Does this make it clear?

Here’s what I would do:

  • create a user-specific column in the user profile sheet
  • on the form buttons, assign an additional action that sets the value of the user-specific column just created based on the button that is being pressed
  • when the button for note 1 gets pressed, for example, that user’s profile column gets a value of 1
  • this column value can then be pulled in through the user profile columns in the form submission
1 Like

Thanks - great - that will work. Much appreciated!