Hello everyone, I have created a Gallery to which I have inserted two TextInputs to take millimeter and pressure data of the tires of a vehicle. What I need is a formula that validates all the TextInputs in the Gallery, and if in a given case there is one or more empty TextInputs the Collection can not be saved and do not pass to the next screen.
The conditional formula that I am using in a button is the following:
If (TextInput_mm.Text = "" Or TextInput_psi.Text = ""; Navigate (Alerta_Validacion; ScreenTransition.Cover); ClearCollect (LlantasMP; ForAll (Gallery_Llantas4.AllItems; {IdLlanta: IdLlanta; Millimeters: TextInput_mm.Text; Pressiones: TextInput_psi. Text})) ;; Navigate ('Semanal (Mptor)'; ScreenTransition.Cover))
This formula is only validating correctly the first 02 TextInputs of the first rim (TextInput_mm and TextInput_psi), but not with the others.
Solved! Go to Solution.
Hi @EMARIN91
Clear(LlantasMP); ForAll( Gallery_Llantas4.AllItems; If( !IsBlank(TextInput_mm.Text) && !IsBlank(TextInput_psi.Text); Collect(LlantasMP; { IdLlanta: IdLlanta; Millimeters: TextInput_mm.Text; Pressiones: TextInput_psi. Text } ) ) ); If(CountRows(Gallery_Llantas4.AllItems) = CountRows(LlantasMP); Navigate ('Semanal (Mptor)'; ScreenTransition.Cover);Navigate (Alerta_Validacion; ScreenTransition.Cover))
Hello,
You can try instead of
TextInput_mm.Text = "" Or TextInput_psi.Text = ""
the following:
LookUp(Gallery_Llantas4.AllItems,IsBlank(TextInput_mm.Text)||IsBlank(TextInput_psi.Text),true)
Hi @EMARIN91
Clear(LlantasMP); ForAll( Gallery_Llantas4.AllItems; If( !IsBlank(TextInput_mm.Text) && !IsBlank(TextInput_psi.Text); Collect(LlantasMP; { IdLlanta: IdLlanta; Millimeters: TextInput_mm.Text; Pressiones: TextInput_psi. Text } ) ) ); If(CountRows(Gallery_Llantas4.AllItems) = CountRows(LlantasMP); Navigate ('Semanal (Mptor)'; ScreenTransition.Cover);Navigate (Alerta_Validacion; ScreenTransition.Cover))
Thank you very much, your code was very helpful.
User | Count |
---|---|
142 | |
141 | |
77 | |
74 | |
71 |
User | Count |
---|---|
231 | |
164 | |
75 | |
67 | |
61 |