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!
@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.
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.
User | Count |
---|---|
41 | |
36 | |
30 | |
23 | |
16 |