How To Bulk Edit/Input an Enum Field on Multiple Selected Records

Situation:
I have a main table “Books” where each record represents a book title. The columns/fields store details about each book, e.g. title, author, a URL to the cover image, etc.
One column in the table is an ENUM field called “Cover Type”. It categorizes the basic cover design of each book.
The possible values for this ENUM field is stored in another Table “Possible Cover Types”. For example, “Landscape”, “Person”, “Other”
I successfully have set the ENUM field to autocompute the suggested values based on the possible cover types options listed in the “Possible Cover Types” table. (e.g. Cover Type[Possible Cover Types].

What Works:
In the Detail View for each Book, I have a Quick Edit for this Cover Type Enum Field, showing as buttons. So going through each book record, I can quickly set the Cover Type for each book with one click.

Challenge: Bulk Select/Edit
But I also want to set the Cover Type of multiple books in bulk. For example, I have a Gallery View or List View of all books that shows the thumbnail/image of all book covers.
Appsheet natively allows the user to select multiple books in such Gallery or List view. And then one can of course set an Action to be performed on these selected books.
HOWEVER, I am struggling to define an action that bulk sets the Enum “Cover Type” field, pulling and using the possible Enum Values from the “Possible Cover Types” table and letting me choose one of the possible options and bulk set it in all selected records.

I was trying to define an ACTION of the type: “Set values of some columns of this row” – and bulk apply this action to all selected. But I struggle to find the syntax to use this to set the value of an enum field. Also the ACTION type “Execute an action on a set of rows” does not get me any further.

What am I missing? Is this possible at all? And if so how?

If I have understood your requirement correctly, you could use the concept described in the sample app below.

In the sample app, the user setting in the filter table is used as a slice expression. You could use it as an action expression for the action type “Set values of some columns of this row” instead.
https://www.appsheet.com/samples/Allow-the-user-to-filter-a-view-based-on-a-form?appGuidString=91266cff-e843-46b8-a42b-3d85afedb37f

You could also possibly explore userestings with the action expression as USERSETTINGS(CoverType) wherein cover type is a usersettings field of Enum type. However, in general, usersettings are used for infrequently changing app settings. They require an app sync to take effect.

2 Likes

Hi Suvrutt, thank you for your swift answer. I will have to explore your answer in more detail. I am not sure how it relates to my problem.

The question behind my question is simply:
What ACTION can change the value of a data FIELD (aka COLUMN) XYZ for MULTIPLE SELECTED RECORDS at the same time, WHEN the DATA TYPE of the Field XYZ is ENUM?
Example: The Field “Cover Type” is ENUM and allows the values “Blue”, “Red”, “Green”.
I want to be able in a gallery to select MULITPLE rows (i.e. Books) and click/trigger an ACTION that will give me buttons or a dropdown list of these Enum values Blue, Red, Green, let me chose one and set it accordingly for all selected records.
Is this clearer?

Hi @Newt ,

Thank you for more details. These certainly help. Based on your latest inputs, I believe I had understood your requirement. I believe the operation sequence you are looking for is currently not possible,

As a result, I suggested a workaround that is feasible and essentially just changes the sequence.
Your proposed sequence is 1) Select multiple rows 2) Select enum choice and 3) Execute bulk action

The suggested approach will 1) Select Enum choice 2) Select Multiple Rows and 3) Execute bulk action.

1 Like