Dynamic Confirmation Message in Action

I would like to use an IF() expression in the Confirmation Message of an Action like:

If(ISBLANK([PDF]) , “A PDF will be sent” , “A PDF was already sent. Are you are you sure to send it again?”)

Solved Solved
0 22 2,855
1 ACCEPTED SOLUTION

Here is the same feature request but with more votes

View solution in original post

22 REPLIES 22

Though you could probably create this with a “sequence of actions”.

That’s how I did it

@Fabian can you guide me how you used a sequence of actions to get different Confirmation Messages to display?

Excellent!

Any news on this?

With a sequence of actions, besides of being counter-intuitive and not very clean, its not possible to add like “an e-mail with be sent to A and B” if A and B are not static.

Sorry… I’m not sure what do you mean by “its not possible to add like “an e-mail with be sent to A and B” if A and B are not static.”. Do you have more details about it?

Change the text appearing on the confirmation message dynamically, is surely one of the awaited new feature, but I just read the full thread.

Not sure if this will solve the problem Fabian did have on this original post.

@Fabian

Let me explain.

When we send email with attachment of PDF, we need to set action, and action should be triggered by the change in value in a certain row. For instance, when i fire workflow, I do set a action change the value in a certain field. I do have [TriggerEmail] field and initial value is set to 0 with number type.
When the user send email, then action will increment the value all the time. Just + 1 to this field.

Then when the value of this column is zero, show one action to submit email with attachment. Then set the message, "You will send email with attachment first time " or something.

And then create another action and first action will be hidden when the value of this field is more than 0. i.e. 1 or 2 or more.

Then append the message to action “You have already send the email with attachment before. Are you sure to resend?”

This is what I just thought after i read this old thread.


Regarding the sequence of actions, I do believe the Appsheet team do have rooms for improvement.

In terms of programming, there are two ways either Async or not.

Let me assume we have two actions, one is fired under certain condition. The second action will be fired when the first action failed to be invoked.
Then put those two actions into one action, ie. Sequence of Actions.
Unfortunately, Appsheet does not work well.

Technically, the first action should assess if it should fire the action or not? If it does meet the condition, yes, appsheet does fire even now.
If we failed the first testing, naturally the second action to be fired, but unfortunately not.

Ex:

My action is to send an e-mail to everybody from a list with score over 80 points. I would like the confirmation to be like:

“This will send an e-mail to Hugo, Aleksi and Tsuji. Do you confirm?”

I’m afraid dynamic confirmation text is not available yet.

Hi @Henry_Scott

  1. Set up an Action “Grouped: execute a sequence of actions”
  2. Set up different actions and add them to the Grouped Action. Set them to “Do not display”.
  3. Each of these actions must have a condition under BEHAVIOR → “Only if this condition is true”. So that only one Action can fire, when you press the Action Button.
  4. Enable “Needs confirmation?”
  5. Enter the Confirmation Messages

Please have a look also on this post:

Hi @Fabian. Thank you for this. I am ok with steps 1-5 and understand Grouped Actions. I am struggling to get my 3 x Actions that “Set these columns” values in one column [CaseConfirmSave] to Low, Medium and High respectively based on Yes/No selected in 3 x other Columns. I want to display 3 x different Confirmation Messages - each Action contains a specific Confirmation Message. So on FromSave I am executing the Grouped Action that contains these 3 x Actions. My expectation is that only the Action whose [CaseConfirmSave] = TRUE under BEHAVIOR --> “Only if this condition is true” will be executed and the other 2 x Actions will not be executed. My fromula for this is “[CaseConfirmSave] = TRUE”

I am struggling to get that to work. Below is my LOW, MEDIUM and HIGH formulas for “Set these columns” values in column [CaseConfirmSave] respectively in each Action (Low, Medium, High):

LOW
IF(OR([CaseClinicalCriteriaCough] = FALSE,[CaseClinicalCriteriaShortnessBreath] = FALSE,[CaseClinicalCriteriaHighFever] = FALSE
)
,TRUE
,FALSE
)

MEDIUM
IFS(
OR([CaseClinicalCriteriaCough] = TRUE,[CaseClinicalCriteriaShortnessBreath] = FALSE,[CaseClinicalCriteriaHighFever] = FALSE
)
,TRUE
,
OR([CaseClinicalCriteriaCough] = FALSE,[CaseClinicalCriteriaShortnessBreath] = TRUE,[CaseClinicalCriteriaHighFever] = FALSE
)
,TRUE
,
OR([CaseClinicalCriteriaCough] = FALSE,[CaseClinicalCriteriaShortnessBreath] = FALSE,[CaseClinicalCriteriaHighFever] = TRUE
)
,TRUE
)

HIGH
IFS(
OR([CaseClinicalCriteriaCough] = TRUE,[CaseClinicalCriteriaShortnessBreath] = TRUE,[CaseClinicalCriteriaHighFever] = TRUE
)
,TRUE
,
OR([CaseClinicalCriteriaCough] = TRUE,[CaseClinicalCriteriaShortnessBreath] = TRUE,[CaseClinicalCriteriaHighFever] = FALSE
)
,TRUE
,
OR([CaseClinicalCriteriaCough] = TRUE,[CaseClinicalCriteriaShortnessBreath] = FALSE,[CaseClinicalCriteriaHighFever] = TRUE
)
,TRUE
,
OR([CaseClinicalCriteriaCough] = FALSE,[CaseClinicalCriteriaShortnessBreath] = TRUE,[CaseClinicalCriteriaHighFever] = TRUE
)
,TRUE
)

This one expression can replace the three you’re using now:

SWITCH(
  (
    0
    + IFS([CaseClinicalCriteriaCough], 1)
    + IFS([CaseClinicalCriteriaShortnessBreath], 1)
    + IFS([CaseClinicalCriteriaHighFever], 1)
  ),
  0, "LOW",
  1, "MEDIUM",
  "HIGH"
)

@Steve thanks, I knew it could be optimized, but my skill set is limited as a developer. Always appreciate your input in helping us to improve formulas. Thing is I need them separated in 3 x Actions. So I will use your way of doing for 3 x Actions.

I am still not getting the 3 x separate Actions working in a Grouped Action as explained ABOVE.
Not sure if @Aleksi or @Fabian can shed light on this.

Why do you want three different confirmation messages?

@Steve. As explained above, I require 3 x Different Confirmation Messages when I Save a record based on a Column Value that is set. I want display to the User in the case of what is selected and then calculated in a Column:

  • LOW - Your risk is LOW you may be stressed so get some rest.
  • MEDIUM - Your risk is MEDIUM drink water regularly and observe good hygiene.
  • HIGH - Your risk is HIGH but do not panic just call the hotline 0800029999 and isolate yourself from family and friends if confirmed to do so by the call.

Appsheet does not allow the use of Columns in formulas for the Confirmation Message on an Action. The way to do it according to threads on this forum is to have 3 x Actions executing in a Grouped Action when the Record is Saved. Each Action will have its own “hardcoded” Confirmation Message.

The way I am solutioning this in my head is…

  • “Set these columns” values in one column [CaseConfirmSave] to Low, Medium and High respectively in the 3 x differeent Actions based on Yes/No selected in 3 x other Columns.
  • I want to display 3 x different Confirmation Messages - each Action contains a specific Confirmation Message.
  • So on FormSave, I am executing the Grouped Action that contains these 3 x Actions.
  • My expectation is that only the Action whose [CaseConfirmSave] = TRUE under BEHAVIOR --> “Only if this condition is true” will be executed and the other 2 x Actions will not be executed.
  • My formula for this is “[CaseConfirmSave] = TRUE”

Hope this makes sense

@Steve & @Fabian I have implemented this logic above and the Grouped Action is not executing or the 3 x Actions are not executing as a result in flawed logic I have as explained above or errors in my original formulas (I have met yet managed to split @Steve optimised formulas)

So what I tried to Debug it is to only execute the LOW Action to see. The config and code below does not execute on SAVE of the Form. Cannot see what I am doing wrong

Code for setting the Column [CaseConfrimSave] value is:
IF(
OR(
[CaseClinicalCriteriaCough] = FALSE,
[CaseClinicalCriteriaShortnessBreath] = FALSE,
[CaseClinicalCriteriaHighFever] = FALSE
)
,TRUE
,FALSE
)

@Steve if you have time, I can give you access to see what is happening

Some more feedback. I took ONE of the 3 x Actions to see if I can Debug things, but it still seems to not be working even with this one Action

I have changed the “Only if this condition is true” = TRUE to see if the Confirmation Message will be displayed. It does display the Confirmation Message and it now sets the Column [CaseConfirmSave] value in the Google Sheet and as I said it displays the Confirmation message(s)

So if I set the “Only if this condition is true” to [CaseConfrimSave] = TRUE then the Action is not executed. Seems the value of [ CaseConfrimSave] is not set under “Set these columns” which contains the formula OR the value is set (I tested the formula and it works in a Calculated Column), but the “Only if this condition is true” = [CaseConfrimSave] = TRUE is not executed/validated

Note sure how to solve this because I only want these Actions to Execute if [CaseConfirmSave] is set

I’m afraid I can’t look at your app configuration directly; I can only offer advice here.

The problem appears to be that your Only if this condition is true expression is attempting to use the value set by the action itself. That won’t work, as the Only if this condition is true expression is evaluated before the action sets the column value. Consequently, the column value will never be set when the Only if this condition is true expression is evaluated.

For each action, I recommend moving the expression you currently use to set the CaseConfirmSave column value to Only if this condition is true instead. Then, have the action set the CaseConfirmSave column value to TRUE.

@Steve, I understand. Thanks for the time to give advice. I am afraid I then misunderstood the function of the Action utility. Let me try your suggestion. Will revert

@Steve it is working like a charm. Thanks for your assistance. Now I know how Actions actually work

Here is the same feature request but with more votes

Top Labels in this Space