As a user of any enterprise software probably knows, a lot of time is spent filling in forms. Having an easy way to set default values for these forms can go a long way to speeding up your users' workflows and making your data more uniform.
That's why we've added a way for admins to set up default values for all sorts of forms in our app.
Say you're an Admin and you want your lab to name all the new designs that they make in a particular way. For example say you want every design name to include the user initials, the word Design, and a unique id like: TR-Design-8j0101jf
See which fields allow defaults
Here's how you can now do that. On the new design page, Admins should see a small yellow dot in the design name form field:
Hovering that dot shows the following:
Enter Assign Defaults Mode
Admins can enter a special Assign Defaults Mode where certain fields can have defaults set for them (the list of these fields is ever growing and if you feel like a field is missing, you can always request that field be added to the list!)
Press Shift-D or hit Assign Default Mode in the User Icon dropdown:
You should now see a yellow border appear to let you know you're in assign default mode:
Click the yellow Assign Default button to set a new default for the field. A dialog should appear:
Here you have the option of either setting up a nunjucks template (https://mozilla.github.io/nunjucks/) or an integration endpoint to set the default.
In Template mode, clicking on any of the parameters will add it to the Template String field. A preview of what the field will look like is shown in the Example Output field (see below).
You also have the option of preventing the user from changing the default value you set by toggling off the Allow User Override button. Use this functionality with care!
In Endpoint mode, the parameters in the list will be sent to the endpoint of your choosing.
If you've set up an endpoint in the node-red integration server, it should automatically be suggested as an option:
Hit the "Trigger Endpoint" button to test out your endpoint's response:
After clicking Submit, you should see your new default value filled in immediately:
Default Value Settings Page
To get to the Default Values settings page, you can click on the settings button in the User Dropdown or here:
The will bring you to the Default Values settings page:
You can also modify any of the default values from this page or reset any back to the system default. Use the search bar to find the field you're looking for.