Default (initial) value in a Enum

Note: All data pictured here is hypothetical and not real student data.

I have an app with a table view called goal_setting. In that table, I need people to fill out a variety of information on specific students. I fill in the student identification information (Name and ID number) on the backend spreadsheet, so when a user opens the view, they see the student's name and they can answer various questions about the customer. Here is a picture of the backend:

gsgilbert_2-1648495783041.png

Most of the columns are Enum type. When a user opens the tab for the goal_setting view they see a list of students:

gsgilbert_5-1648496667347.png

When they click on a student's name, they see:

 

gsgilbert_3-1648495928739.png

When they click edit, they see:

gsgilbert_4-1648495960434.png

I want to set the initial values of all the Enum and EnumList columns to be "Not Answered." When a user opens the goal_setting view and clicks on a student, I want them to see all the questions with the text "Not Answered" i.e.:

gsgilbert_6-1648496724802.png

 

I'm having trouble setting the initial value because I am prepopulating some of the data in the spreadsheet (I'm not creating a new entry). I know that I can go into the backend spreadsheet and write "Not Answered" in each column (that's how I got the image above), but I want to know if there is a way to do this in Appsheet rather than in the spreadsheet. 

 

I hope this question makes sense, I'm glad to provide any clarifying information. Thank you!

 

0 6 238
6 REPLIES 6

Have you tried setting the initial value of those cols?

TeeSee1_0-1648512933571.png

 

 

Forget my suggestion.

Rows are already created and the Initial Value doesn't work.

As @Marc_Dillon says, not easy to do..

 

Just had an idea. See if this works for you. My quick test seems to work..

  • Create an action 1 to Set the values of cols on this row to "Not Answered"
    • your assignment expression need to make sure not to overwrite any values other than "Not Answered"
  • Create an action 2 to Open the form to edit this row
  • Create an execute a seq of actions to execute 1 and 2
  • Set the Sequence action on the row selected event of the Goal Setting table view

Thanks for your input! I've realized I may just want to create a nested view or pull the data from another sheet instead of manually entering it.  

For the Form view, you could use an appropriate resetOnEdit expression to re-evaluate the Initial Value.

For the Detail view, you can't show data that isn't there yet. You could perhaps build a Virtual Column that would output the list of columns that do not yet have answers.

 

It may be better to instead figure out a way to include the "Not Answered" values into the columns from the beginning.

If you're manually entering the data directly into the spreadsheet (which, by the way, is never a great thing to do for an Appsheet app), then why would it be so much more work to simply copy that value into all the other columns? Perhaps you could just pre-populate that value into all of those columns for all rows in the spreadsheet, then as long as there is no value in the key column, they won't be loaded into the app. Alternatively, you could write a Google App Script to handle it for you.

 

Either way, what you're asking for is not easily solved.

"If you're manually entering the data directly into the spreadsheet (which, by the way, is never a great thing to do for an Appsheet app)," this makes sense. Unfortunately, we are already collecting data using a Jotform, and the AppSheet app is intended for further data collection that we can't manage through Jotform. It would have been nice to do everything with Appsheet, but that's not an option at the moment. Thanks for your input!

Top Labels in this Space