How to get Multiple Choice Checkboxes in a form with pre-filled values from a comma-delimited value?

Hi everyone. This is my second question on my first project. The app is a form that includes values that may be pre-filled on the associated spreadsheet and also may be overwritten by the form User. I have this working fine now on my text fields and drop-downs, but now I have a special challenge.

The form is to include a field labeled "Crew" and the answers are to be in the form of multiple-choice. The Tab the form is using is named "moves" and has a single column named "crew." Each row represents a job to which crew members may be assigned. The Spreadsheet User may assign multiple crew members to a job via the Dashboard tab, pulling choices from a Tab also named "crew"  in which all of the crew members are listed. Once the Spreadsheet User schedules a job, their choices of crew members appear in the Moves Tab in the appropriate row and the "Crew" column, as a comma-delimited string.

What I need is for the values in this string to appear as checked boxes, and all crew members not included in the value to appear as unchecked boxes. Thereby, if there has been a last-minute change in the crew actually working on the job, the Form User may change the values by checking or unchecking the right box. And finally, I need the Crew member choices submitted on the form to be returned to the same cell in the Moves Tab, again as a comma-delimited string.

I have done this exact same project with Google Forms; these pics show what I want.
Screen Shot 2023-04-17 at 6.06.26 PM.pngScreen Shot 2023-04-17 at 6.06.07 PM.png
I have no clue how to do this in AppSheet! Thanks for your help!  
----------
Edit: I realize some may wonder why I need this comma-delimited thing, and why I don't instead of using a single column for crew, have a separate column for each crew member and use checkboxes there.

The reason is that the Crew Tab has a double purpose: it is to be both where upcoming jobs are listed for reference by the Form, and the place where completed jobs reside; a database of the company's entire recorded job history. Completed jobs are distinguished from upcoming ones by an entry in the column "Status."

Since crew members come and go, having a separate column for each one would require adding a new column every time a new member is hired, while maintaining columns for members who have left the company, just for the sake of the database's records.

Now, I do realize that instead of doing it this way, I could keep the upcoming jobs in a separate Tab and have the Form enter its results in the database Tab. While that would enable me, with relatively less headache, to use one column per crew member in the tab for upcoming moves, I would still need the form results for this entry to be concatenated into a comma-delimited string, anyway. So, all of that redesign would only serve to solve one half of this problem.

Solved Solved
0 4 1,664
1 ACCEPTED SOLUTION


@SparklyGeek wrote:

Are you saying the list of employees must be updated manually in AppSheet?


No, I am saying that the entries already in the Crew column that are not already properly formatted need to be manually changed so they can be read properly into the EnumList Crew column.  I don't know how your current Crew column values were assigned.  It doesn't appear it happened with the column defined as an EnumList.  

To test this and so it makes more sense,  do this:

  1. Define the Crew column as an EnumList in the app - if not already. 
  2. In just a single row in the sheet, change the Crew column, that has a comma, so that there is a space before and after each comma.
  3. Sync the app.
  4. In the app, select the row you just changed in the sheet and hit the dropdown of the Crew column.  You should see the values checked in the list as selected items.
  5. View a row where you DIDN'T change the comma spacing.  Note the difference.
  6. Now, update the Crew column for the rest of the rows in the sheet.

Going forward this "comma formatting" should happen automatically, when entering a new row or editing an old row, from AppSheet where you are selecting values from the EnumList dropdown.  AppSheet will automatically put in the proper spacing in the sheet for the list of values.  The column has to be defined as an EnumList for this to happen correctly.

 

View solution in original post

4 REPLIES 4

Define the column as EnumList.  For the List of values in the sheet, make sure each comma has a space before and after it...like this:

Kwame B , Wendell C

NOTE:  You only need to adjust the commas with space for any list values that were NOT already saved from an EnumList column in the AppSheet app.  For example, if you got the list form some external source OR the list was manually type into a Text field, then you will likely need to adjust the comma spacing.

Are you saying the list of employees must be updated manually in AppSheet? Can't it be based on the entries in the Tab Crew?

How would I pre-fill values this way, and how would I get the results returned as a comma-delimited string?


@SparklyGeek wrote:

Are you saying the list of employees must be updated manually in AppSheet?


No, I am saying that the entries already in the Crew column that are not already properly formatted need to be manually changed so they can be read properly into the EnumList Crew column.  I don't know how your current Crew column values were assigned.  It doesn't appear it happened with the column defined as an EnumList.  

To test this and so it makes more sense,  do this:

  1. Define the Crew column as an EnumList in the app - if not already. 
  2. In just a single row in the sheet, change the Crew column, that has a comma, so that there is a space before and after each comma.
  3. Sync the app.
  4. In the app, select the row you just changed in the sheet and hit the dropdown of the Crew column.  You should see the values checked in the list as selected items.
  5. View a row where you DIDN'T change the comma spacing.  Note the difference.
  6. Now, update the Crew column for the rest of the rows in the sheet.

Going forward this "comma formatting" should happen automatically, when entering a new row or editing an old row, from AppSheet where you are selecting values from the EnumList dropdown.  AppSheet will automatically put in the proper spacing in the sheet for the list of values.  The column has to be defined as an EnumList for this to happen correctly.

 

Thanks, that worked perfectly!

Top Labels in this Space