Change status of field Y in table A based on update to field X in table B

Hi All

I have a table that contains a list of reservations. Once the maximum number of reservations for an activity is reached, any new reservations for the same activity go into a waitlisted status.

I would like to be able to change the first waitlisted reservation every time a cancellation takes place.

I have tried by using Actions and Bots and donโ€™t see an option where I can use MINROW() to achieve this.

Any ideas ?

Thank you

0 3 129
3 REPLIES 3

Yes, the approach to do is to use a Reference Action. It allows you to identify a set of rows (in this case, your set of rows is of size 1) and to invoke an action on that set of rows (in this case, to un-waitlist that reservation)

Hi @praveen

Thanks for the guidance. For my understanding, Reference Action means โ€œData:execute an action on a set of rowsโ€ in Behavior?

I have used this and added the following as the Referenced Rows.
MINROW(โ€œRESERVATIONSโ€, โ€œWAITโ€,([STATUS]=โ€œWait Confirmedโ€))

This is giving me an error "
โ€œThe expression is valid but its result type โ€˜Refโ€™ is not one of the expected types: Listโ€

Any ideas ?

Thank you
J

MINROW() returns a single Ref value, but Referenced rows expects a list of Ref values. Wrap MINROW() with LIST():

LIST(MINROW(โ€œRESERVATIONSโ€, โ€œWAITโ€,([STATUS]=โ€œWait Confirmedโ€)))

See also:

Top Labels in this Space