Dependant Enum values

Hi,

I am having an issue that I am having trouble with which I would like some help.
I have a Enum field called โ€œStatusโ€ with the following enum values (Non Initiated, Initiated, Terminated, Suspended, Paid). I would like the user to be able to select the 4 first values Non Initiated, Initiated, Terminated, Suspended) and the last one (Paid) to be dependant of another field called โ€œDate of Paymentโ€
So basically once โ€œDate of Paymentโ€ is inserted than โ€œStatusโ€ must be Paid no matter the previous selection.

can you guys help me to make this work?

1 13 619
13 REPLIES 13

Steve
Platinum 4
Platinum 4

For the Valid If expression for the Status column, try:

IF(
  ISNOTBLANK([Date of Payment]),
  LIST("Paid"),
  LIST("Non Initiated", "Initiated", "Terminated", "Suspended")
)

Thanx for your input.

it almost worked, when I check the table (google sheets) it doesnโ€™t record โ€œPaidโ€ on the column โ€œStatusโ€
It lists it but then it needs a click in order to make it active.

That is not the desired actionโ€ฆ I want the the option to be selectedโ€ฆ not listed

Hi @Luis_Gomes_Machado,

Based on your latest input that you wish the status to be auto populated with โ€œPaidโ€ status when the [Date of Payment] column isinserted, you may wish to consider following approach to add to the guidance already by @Steve. This approach will work if the app user needs to open the corresponding record form to update the date of payment.

The valid_if of status column is as per guidance given by @Steve

You may consider an action type โ€œDate : Set the values of some columns in this rowโ€ to change the value of column Status to โ€œPaidโ€. This action may be set to โ€œDo not displayโ€ option.

The condition to run this action may be ISNOTBLANK([Date of Payment])

This action can be set as an event action on form save option on the view settings pane of view โ€œActividades por Obra_Formโ€

Finally the editable_if condition on status column could be AND(ISBLANK([Date of Payment]),[Status]<>โ€œPaidโ€)

Hope this works and helps.

ohhh man you have no idea how it helpsโ€ฆ I am so thankful for you guys that take the time to help me.

I was able to do everything on the list of tasks that you gave me but one:
This action can be set as an event action on form save option on the view settings pane of view โ€œActividades por Obra_Formโ€

I dont know where to do thisโ€ฆ
The table of โ€œActividades por Obraโ€ has the following views:
Primary Views
โ€œEstado de Actividadesโ€ (Activities Status in english) which is a chart
โ€œActividadesโ€ which is a table
โ€œDashboardโ€ which is a dashboard view obviously
Menu Views
โ€œActividades por Aplicadorโ€ (Activities per employee) as a table
โ€œActividades por Corteโ€ as a deck
โ€œAreas m2โ€ as a table
โ€œCortes de Obraโ€ as a table
โ€œPriorityโ€ as a table

these are the views I have so I donโ€™t know where to find โ€œform save option on the view settings pane of viewโ€

Hi @Luis_Gomes_Machado,

I believe โ€œActividades por Obra_Formโ€ should be a system generated view. Please click on the โ€œShow System Viewsโ€ ( This option is at the bottom) under UX - > Views and then you will get to see the view "โ€œActividades por Obra_Formโ€ .

In this viewโ€™s settings, please select the newly created action under the option โ€œEven Actionโ€ under โ€œForm Savedโ€ sub option.

Thanx again!!!

Iโ€™ve finally completed all the steps and it didnโ€™t work

can you think of something else?

Could you explain how it didnโ€™t work? Is something blank that shouldnโ€™t be? Is some value wrong? Is there an error message?

well no action happened and the previous selected enum value staid the same

I dont mind to share the app and the sheet with you guys, if you want
but please tell me what its needed to make this work as I need to learn

Hi @Luis_Gomes_Machado,

Could you please mention, how the date of payment is populated by the user. The suggested logic assumes that the date of payment column is a real column and it is blank till the user populates it. Does the date of payment column have any initial default value?

Also the action takes place only after the form is opened and saved. Thereafter the status will get locked to โ€œPaidโ€. If you have any existing records that are previously created, the status will change to paid only after the record is opened, date of payment is populated and record saved.

Thanx again for your time.

The date of payment is populated by the user through a different table called โ€œCorte de Obraโ€.
This table handles activities, An invoice is generated by a group of activities that is executed between a specific time frame which we call (Corte de Obra).
This Corte de Obra has a specific table with its columns like โ€œCorte de Obra IDโ€ and Corte de Obra Number" as well as โ€œDate of Paymentโ€, each row input to this table referes to a group of activities on the table previously mentioned โ€œActivitiesโ€. Once you set the date of payment in Corte de Obra, I have a formula in google sheets โ€œ=if(NOT(W2=โ€"),VLOOKUP(W2,โ€˜Corte de Obraโ€™!$B$2:$N,13,FALSE))" that pulls this record into the activities table to a real column named exactely the same โ€œDate of Paymentโ€ in every activity that is related to Corte de Obra, so I can create format rules depending on the status of the activities: โ€œNon Initiated, Initiated, Terminated, Suspended, Presented for payment, Paidโ€

I have considered what you mentioned as the input was populated from a different table and by a different user and I edited the activity and clicked on save to see if the status changed, but it didnt

Hi @Luis_Gomes_Machado,

You may wish to take a look at a tiny sample app that I put together at the following path.

Here the "final"status is โ€œAcceptedโ€ that is automatically set when the [Date of Acceptance] is populated. I also added a VC [Status V] to take care of period before the form is getting saved. The real column gets updated only on form save. Till then the Status VC provides the updated status in the form view. Hope this helps in some way.

Conditional Status Update

I love how this work !! and it is exactly how I need

please refer to my other reply ti understand throughly my problem

Top Labels in this Space