Hi,
i am working on app that required check box instead of text input on edit screen . if i checked check box it should write in text input "PH". If i uncheck it should remove "PH". if previously "PH" is there, when i open edit form check box should be checked by default because of "PH" was There.
Please help me how can i achieve this .
thank you
Try some code like this in the Default property of the text input:
If(
CheckBox1.Value,
"PH",
""
)
In the OnCheck and OnUncheck properties of the check box put:
Reset(inputText1); // Reset the input text control
Hope that helps,
Bryan
Hi @ursNani,
Could you please tell me that if you want to populate the TextInput based on the Checkbox value?
Could you please share a bit more about your scenario?
I assume that you want to populate the TextInput with "PH" if you tick the Checkbox, and leave it with blank if you uncheck the Checkbox, all this will only be operated in a New Form. However, if you edit an existing record, once you open the edit form, the Checkbox should also be checked based on the "PH" value.
If so, I think you should try as below.
1). Set the Default property of the TextInput as below:
If(IsBlank(ThisItem.Title),If(Checkbox2.Value,"PH",""),ThisItem.Title)// Title is the column I need to populate with the "PH"
2). Set the Default property of the Checkbox as below:
If(!IsBlank(ThisItem.Title)&&ThisItem.Title="PH",true,false)