How can I use the current value of a form field as a default for a column when adding a row in a table? (Like in the cd exercise).
It's unclear to me how to use the 'Default value' in the properties tab for that.
Use form field value as default for column when adding table row
Moderators: Jon, Steve, Ian, Dave
-
- Ebase User
- Posts: 86
- Joined: Thu Mar 08, 2018 2:52 pm
-
- Ebase User
- Posts: 649
- Joined: Mon Dec 09, 2013 6:37 pm
Re: Use form field value as default for column when adding table row
I think that I understand what you're asking but I want to be sure.
So you have a field called SOMEFIELD
When you a row is added to the table, you want to put the value of SOMEFIELD into one of the columns of the table ?
If that's right, you cannot use the default value as far as I know. What you can do is add an Add Row event in the table properties that gets called when a new row is added.
In the script that gets called when an add row event is triggered, you'd add something like this:
tables.MYTABLE.SOMECOLUMN.value=fields.SOMEFIELD.value;
So you have a field called SOMEFIELD
When you a row is added to the table, you want to put the value of SOMEFIELD into one of the columns of the table ?
If that's right, you cannot use the default value as far as I know. What you can do is add an Add Row event in the table properties that gets called when a new row is added.
In the script that gets called when an add row event is triggered, you'd add something like this:
tables.MYTABLE.SOMECOLUMN.value=fields.SOMEFIELD.value;
Last edited by Segi on Thu Apr 05, 2018 2:58 pm, edited 1 time in total.
0 x
-
- Ebase User
- Posts: 86
- Joined: Thu Mar 08, 2018 2:52 pm
Re: Use form field value as default for column when adding table row
Thank you for your support. This works!
0 x
-
- Ebase User
- Posts: 649
- Joined: Mon Dec 09, 2013 6:37 pm
Re: Use form field value as default for column when adding table row
You're welcome. Glad to help
0 x
Who is online
Users browsing this forum: No registered users and 16 guests