Multiple actions with last one to create all clear to do next one

Hi,

I have an order entry system which allows orders to be exported to xero with an action button. I have multiple actions wherre the last one sets a column in the order table to โ€œrunโ€. I then have an expression that only allows the โ€œexport to xeroโ€ button to show when that has been set to โ€œrunโ€.

The purpose of this is to stop users hitting โ€œexport to Xeroโ€ before the order has been fully saved to the order and order details table.

The button shows up immediatley though even if [Run 2] hasnt been set to โ€œRunโ€ yet

AND([Order Status]=โ€œOpenโ€,([Run 2]=โ€œRunโ€)

Thank you Phil

0 7 236
7 REPLIES 7

tony1
New Member

@Phil_Waite Not sure if this a typo in your post or in your expression, but youโ€™ve got an extra โ€œ(โ€ in there:

Instead of

AND([Order Status]=โ€œOpenโ€,([Run 2]=โ€œRunโ€)

try

AND([Order Status]=โ€œOpenโ€, [Run 2]=โ€œRunโ€)

Hi,

Looks like a typo,

Full expression is this to limit which users can see the button at all anyway. The current user type and USEREMAIL() works fine but not the โ€œRunโ€ bit.

AND([Order Status]=โ€œOpenโ€, [Run 2]=โ€œRunโ€,

OR([Current User Type]=โ€œALLโ€,USEREMAIL()=โ€œinfo@listersbrewery.comโ€))

Thanks

Phil

tony1
New Member

@Phil_Waite Have you checked the behavior of your condition via the expression tester? That might help narrow down the problem. You can see how each sub-part of your expression is being evaluated. https://help.appsheet.com/en/articles/961202-expression-assistant-and-expression-builder

Steve
Platinum 4
Platinum 4

Try this instead:

AND(("Open" = [Order Status]), ("Run" = [Run 2]))

Hi,

Iโ€™m still getting the button show up. I enter the order and immediately go to a slice showing current orders. The order just entered shows but with the button even though โ€œrunโ€ has not been written to the spreadsheet.

I need to stop users trying to export to Xero before the order has been saved properly.

Full expression below

AND((โ€œOpenโ€ = [Order Status]), (โ€œRunโ€ = [Run 2]),

OR([Current User Type]=โ€œALLโ€,USEREMAIL()=โ€œinfo@listersbrewery.comโ€))

Please engage support@appsheet.com for further help with this. Someone will need to look at your app configuration.

Thanks Steve

Top Labels in this Space