Problem to save data depending on the variable selected

Hi community,

I have a form where the user can select one variable.

alejandrovargas_0-1655862172545.png

Depends of the selection, the following question has number inputs or yes/no option.

Number inputs:

alejandrovargas_1-1655862202804.png

Yes/No option:

alejandrovargas_2-1655862232643.png

When the user has the Yes/No option, I need the following behavior:

  • When user selects “Yes”, the variables ValorMax and ValorMin should saved in the database with value 1.
  • When user selects “No”, the variables ValorMax and ValorMin should saved in the database with value 0.

I tried the following formula in Data => ValorMax configuration => Auto Compute => App formula

IF([appSheetsBoolean]=Yes,
[valorMax]=1,
IF([appSheetsBoolean]=No,
[valorMax]=0,
[valorMax]=[_THISROW].[valorMax]
)
)

I get the following error: The expression is valid but its result type 'Yes/No' is not one of the expected types: Decimal

I am not sure if we are using the formula in the correct place.

Thanks for your feedback.

 

 

Solved Solved
1 2 62
1 ACCEPTED SOLUTION

Set below in the initial value of valoMIN/MAX and see if it behaves as your expectations.

IF([appSheetsBoolean], 1.0, 0.0)

 If you set the app formula, the user cannot edit the column.

View solution in original post

2 REPLIES 2

Set below in the initial value of valoMIN/MAX and see if it behaves as your expectations.

IF([appSheetsBoolean], 1.0, 0.0)

 If you set the app formula, the user cannot edit the column.

Hi @TeeSee1 , it works perfect in initial value as you recommended.

I used the following code:

IF([appSheetsBoolean]="Si", 
1.0,
0.0
)

 

 

Top Labels in this Space