Is there a way of swapping certain data withi...

(Chris Jeal) #1

Is there a way of swapping certain data within AppSheet?

So, if:

Two cars with drivers arrive

on the track and are both logged in separate entries.

  1. Car A

Driver C 2) Car B

Driver D

The two drivers whilst on the track swap cars.

  1. Car A

Driver D 2) Car B

Driver C

Would there be some behaviour that could trigger this change from within?

So that when the two cars leave with different drivers they arrived with,

the App will show the correct physical data.

Hope that makes some sense.

Thanks in advance, Chris

(Bellave Jayaram) #2

Not sure what data you are wanting to swap in the sheet but yes, if you record the car and driver info at start and stop of the drive, you can detect that there was a swap and trigger a workflow rule that will change the data for you via actions. So the condition for triggering the workflow could be something like:

Select(Table[Driver], AND([Date]=TODAY (), [Status]=“Leave”, [Car]=“CarA”)) <> Select(Table[Driver], AND([Date]=TODAY (), [Status]=“Arrive”, [Car]=“CarA”))

(Chris Jeal) #3

@Bellave_Jayaram Thank you for your quick response, it all looks very good but I’m wondering how I would use this within my App?

My data looks more like the below: How would I incorporate your solution into my App?

Thanks,

(Bellave Jayaram) #4

Create a VC which is a CONCATENATE of

Trl No. and Driver Name In and look for rows where Vehicle is different for that VC value. Your formula could be something like:

Select(Table[Vehicle], [VC]=[_THISROW].[VC], [Driver Location]=“In”) <> Select(Table[Vehicle], [VC]=[_THISROW].[VC], [Driver Location]=“Out”)

If you have more than one matching row for that VC value, you will need a way to select the recentmost.