Customize "Save" button based on data in form?

I have a list of resources than can require confirmation to book or not in table Resources.

Bookings/reservations are entered in table Calendar.

When making a new calendar entry, or "reservation", I want the "Save" button of the form say "Request", if the resource about to be booked requires confirmation.

Usually I'd do if([Resources].[Confirmation required]=TRUE;"Request";"Save"),  but since the localization options are not evaluated in the context of a row, this obviously does not work - or is there a way?

0 7 218
7 REPLIES 7

The best I can think of is that you use a show column right after that record to tell the user what to do:

IF(
  [Resources].[Confirmation required] = TRUE,
  "Request โžก๏ธ",
  "Save โœ…"
)

The save button would have the same name, but the show column would change its "meaning.

Nice - not exactly what I wanted, but it'll do the job!

Actually the first time I'm using a "Show" column, now of course I have a bunch of other ideas what I could do with them.

Yes! Haha, every day I discover something new. AppSheet is a nice tool; it has shortcomings in many areas, but from scarcity, creativity is born.

Another option you could try is as follows. It will change the names in the form's "Save" button position itself.

1. Create another form view on the table 'Calendar" by copying the system generated form view. So if the system generated form view is called "Calendar_Form",  create another form by simply copying the "Calendar_Form" . Call the new copied form say "Calendar_Form_Request" Set position  of this new form as "ref"

2. Hide the default or system generated edit action of the table "Calendar"

3. Create an action in primary position on the "Calendar" table of type "App: go to another view within the app", name this action Edit

4. The expression for the action can be something like below

IF([Resources].[Confirmation required]=TRUE ,  LINKTOROW([key column of Calendar Table], "Calendar_Form_Reuest"),
LINKTOROW([Key column of Calendar table],"Calendar_Form")
)

5. In the localization setting for "Save" term under Settings-> Localization option, please have an expression something like 

SWITCH(CONTEXT("View"), "Calendar_Form_Reuest", "Request", "Calendar_Form", "Save" , "Save")

Now the forms will switch depending on the column [Resources].[Confirmation required] and so will the name of the "Save" button.

Please see a sample of a test app of similar scenario.

In teh example below, the records with the 'State" column as WA have 'Request" in their form "Save" position.

Forms of records with other states have "Save" name for the "Save" button.

Request Save name.gif

The following screenshot shows a record with state other than "WA"  that has  default "Save" name for the form "Save" button.

Save Save form.gif

thanks  @Suvrutt_Gurjar In fact, this is the practical solution @JMacFeegle 

You're rightโ€”since localization expressions in many platforms (like AppSheet, Power Apps, etc.) aren't evaluated in the context of a specific row, referencing [Resources].[Confirmation required] directly like that won't dynamically change the button label based on the selected resource.

Here's a workaround:

Instead of relying on localization settings, use a dynamic expression in the form view itself, typically with a virtual column or form saved action that changes based on the selected resource.

For example, you can:

  1. Create a virtual column in your Calendar table called something like SubmitButtonLabel.

  2. Use an expression like:

IF(
  LOOKUP([_THISROW].[ResourceID], "Resources", "ResourceID", "Confirmation Required") = TRUE,
  "Request",
  "Save"
)
  1. Then use this virtual column as the dynamic label for a custom save action, or display it somewhere contextually.

This way, the form dynamically reflects whether the booking is a simple save or requires confirmationโ€”much like how commercial moving companies evaluate requirements before committing to a move. Some bookings are simple, others need a clear "request" and confirmation before proceeding.

Let me know which platform you're working on (AppSheet, Power Apps, etc.) if you need more specific implementation steps!

IF(
PESQUISA([_THISROW].[ Recurso], "Recursos", "Nome", "Confirmaรงรฃo necessรกria") = TRUE,LINKTOFORM
("Solicitar_Form", ...),
LINKTOFORM("Salvar_Form", ...)


 

Top Labels in this Space