I am having issues with this if statement. The submitform executes anyways regardless . Any thoughts?
If(CountRows(Gallery1.AllItems) = 0,Notify("Entry Not Saved!"));
If(CountRows(Gallery1.AllItems) > 0, SubmitForm(Form1))
Solved! Go to Solution.
Solved it. I forgot about the blank line patch creates. the following below worked:
If(CountRows(Gallery1.AllItems) <=1,Notify("Entry Not Saved!"));
If(CountRows(Gallery1.AllItems) > 1, SubmitForm(Form1))
Place this into a label to make sure your count is 0 when you think it's 0
CountRows(Gallery1.AllItems)
Sounds like something else (like gallery filtering?) is affecting the count.
You could also refactor, ie
If(
CountRows(Gallery1.AllItems) = 0,
Notify("Entry Not Saved!"),
SubmitForm(Form1)
)
Solved it. I forgot about the blank line patch creates. the following below worked:
If(CountRows(Gallery1.AllItems) <=1,Notify("Entry Not Saved!"));
If(CountRows(Gallery1.AllItems) > 1, SubmitForm(Form1))
User | Count |
---|---|
246 | |
103 | |
82 | |
49 | |
42 |