Guys i need help. There should only 1 "On Rou...

(Ganz Montejo) #1

Guys i need help. There should only 1 “On Route” status that should exist. if there’s already an “On Route” Status existing on the table, the status of the “Pending” cannot be edited. how do i do that?

(Bellave Jayaram) #2

Put AND([_THIS] <> “On Route”, ISBLANK(SELECT(Table[Status], [Status]=“On Route”))) in Editable_If of Status column

(Ganz Montejo) #3

@Suvrutt_Gurjar Thanks bud! but im having a hard time understanding this expression given from that article “NOT(IN([_THIS], SELECT(Customers[State], NOT(IN([CustomerId], LIST([_THISROW].[CustomerId]))))))”

(Suvrutt Gurjar) #4

Hi @Ganz_Montejo, Request you to implement guidance given by @Bellave_Jayaram. That is more appropriate for your case because

you will need to have multiple other statuses such as “pending” in the table.The expression given in article prevents any status being duplicated inthe table.

(Ganz Montejo) #5

@Suvrutt_Gurjar @Bellave_Jayaram Thanks for the help guys i got the required code - “=IF([Status] = “Done”, false, OR(AND([_THIS] <> “On Route”, ISBLANK(SELECT(testing[Status], [Status]=“On Route”))), [Status] = “On Route”))”

(Bellave Jayaram) #6

Cool :sunglasses:

(Suvrutt Gurjar) #7

Hi @Ganz_Montejo,Based on my understanding,your concerned table should have only one “on route” status record at any point of time.

You may wish to take a look at the section “Preventing Duplicate Field Values” in the following article. Hope this helps help.appsheet.com - List Expressions and Aggregates List Expressions and Aggregates help.appsheet.com