Answered
Hello,
How would I create a conditional field in my Time Sheet app that will populate the assigned Cost-Code list for any given Job (Job Number) selected in a previous field?
Thank you you for your help!
0
Comments
Please sign in to leave a comment.
My company does this using reference data. Reference data is typically easier to update, since you can update several apps at once without a new version.
You need to create an excel (csv) file that looks similar to this:
The blanks (in row 2 and also in rows 3 and 7) are to get rid of default options in your drop down. If you don't mind having them, you can omit rows 2, 3 and 7.
Go to reference data and upload. Make sure your file is formatted as a csv.
In your app, create a drop down field named Project Number. In field settings, go down to reference data. Select the reference data you'd like to use. Make sure that "Show Duplicates" is unchecked. This will prevent you from seeing a whole bunch of "Project 1, Project 1, Project 1". Select "Project Number" in the Reference Column field, this is the column in the spreadsheet you want the field to display. You do not need to enter the reference screen or field.
Add another drop down field named Cost-Code. This will be your dependent drop down. Under Reference Data, choose the same reference data file as the first drop down. Select "Cost-Code" in the Reference Column field. Under Reference Screen, select the name of the screen your Project Number drop down is located in. In Reference Field, select the name of your Project Number drop down. This will tell your second drop down to reference the choice made in the Project Number field to determine what is available in your Cost-Code field.
That's it! And you can update them as often as you like by re-uploading the csv with any changes. This will automatically push out to all the apps that are associated with that reference data.