Jump to content
  • 0

Storing a Set of Default Values


ray

Question

Hello. I have a datapage (datapage A) that includes a few fields that I would like to autofill with default values. The catch is that I want a user to be able to occasionally change what those default values will be--not be typing over them--but rather by defining them from another datapage; kind of like a settings page for the application. If I store the defaults in their own table there would only be one row for the table and the user would just edit that row when they wanted to change the defaults. I think I can use a trigger to insert the default values in datapage A when I am creating new records. How would I go about maintaining a defaults table with a single record? I don't want to use a two part edit form to "find" the only record in the defaults table before editing it. Is there a better way to go about this? Thank you.

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Hi,

You can actually do this in two ways.

1. DataPage Level (Submission Form)
Set an "On Load" Default Value, then set the Form Element to hidden so the record will not be editable during submission.

Screenshot_2.png.8c56a9a0f78f6049f41939b6598d8cb7.pngScreenshot_1.png.52224e16184c5851de170daa4f7f0278.png

 

2. Table Level

Like what you mentioned, via Triggered Action.

So the trigger would update #inserted upon Insert. 
It would be set up just like this:

 Screenshot_3.png.0332e148e3959d115231b36dcec5e26f.png

 

Hope this helps.

 

Vanellope 

Link to comment
Share on other sites

  • 0

Take note that the trigger will only work if the records were inserted/updated via regular means such as via datapage, direct table, trigger, and Task.

If the records were inserted/updated via importing the data, the trigger will not run hence the default values you set on the trigger will not be set.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...