Hello community: I will appreciate your help ...

Hello community: I will appreciate your help with the following question: In the case of inspections, it is very common to use the questions with the answer options โ€œYESโ€ and โ€œNOโ€. Question: Is there a way for the application to write โ€œ1โ€ or โ€œ0โ€ in the database when the user selects โ€œYESโ€ or โ€œNOโ€ in the application? This is to facilitate the calculation of metrics in subsequent reports, to keep the experience for the user more familiar with the options โ€œYESโ€ and โ€œNOโ€. Thanks in advance!

0 14 417
14 REPLIES 14

@Aleksi_Alkio - I am still learning and like to try out new approaches, but am missing something in your explanation.

Can you clarify what you mean by โ€œIf you call your field as a refโ€โ€ฆ ?

I am not setting this up correctly to get it to work.

My steps: 1. Creates a gsheet TABLE

with two columns.

Then โ€œAddedโ€ as new table in appsheet, with text and number field. 2. In Columns, changed โ€œnumberโ€ to key and set โ€œtextโ€ as label. 3. Created new View called โ€œconvertโ€ and positioned as Ref (but not sure that is what you mean).

*IF I add or edit a record in โ€œconvertโ€, I hoped I could change the Y/N text and see the โ€œnumberโ€ change.

Can you help me understand better?

Apologies for additional questions, but hoping to learn - and really appreciate you taking the time to help like you do!

Hello community: I will appreciate your help with the following question: In โ€ฆ plus.google.com

There is no way to have a Y/N column type record 1 or 0.

but would it be possible to add a virtual column to calculate Yes = 1?

eg: using SWITCH?

@Aleksi_Alkio thanks you!!! I could hide the action. All is perfect.

@Mike_Adler

you can know more about reference between tables (Ref type) in this help article: help.appsheet.com - References Between Tables

References Between Tables help.appsheet.com

Ahโ€ฆ thanks for the clarification. Will give that a shot.

So by reference to another table with Y/N as text plus a number, you can get the 0 or 1 value.

I think I am finally getting itโ€ฆ

Correct

@Mike_Adler not a virtual column, because virtual columns arenโ€™t written to your data store. Instead, you want a normal column with an App formula.

Ah!

I need to get my vocabulary rightโ€ฆ

+Soporte SmartD - good news is, +Steve Coile suggesting this can be done with the App Formulaโ€ฆ

@Mike_Adler thanks for your answer. +Steve Coilethanks for your answer too, but I was trying a diferente solution because if I use App Formula for my 80 Y / N questions, I would have to add other 80 columns and it is not conveniet. Any way yhank you very much.

Create a small table with two columnsโ€ฆ text and number field. The number field is a key and text is a label. If you call your field as a ref, it will show you the text like โ€œYesโ€, but it will save the number 1.

@Aleksi_Alkio your solution is perfect!!! I did it and it worked very well!!! Thank you very much!

Note: Is it possible to delete the arrows that appear in the detail view next to a referenced field?

The ref arrow is an action. You can find it from system actions and then just hide it.

Open the column definition of your table (other than this โ€œtext/numberโ€ table), choose the column type as ref. Open that columnโ€™s definition and choose the correct table for the option โ€œReferencedTableNameโ€ and thatโ€™s it.

Top Labels in this Space