Hi guys,
I have checked everything and everywhere but I'm still struggling with this.
I'm trying to execute two different IF's and I want both of them to be checked and to be executed if true or false.
On button click I'm patching my collection and based on that patch I want to check 2 different criteria, in pseudocode it would look like this:
1. Patch Value (patch #1) - works (on button 1 click)
2. Create new Collection after patching - works
3. Use new patched Collection to check "IF criteria #1" with multiple conditions - if true execute patch #2
4. Use new patched Collection to check "IF criteria #2" No matter what was the result of "IF criteria #1" - if true execute patch #3
Independently steps 3 and 4 are working on two separate buttons for each "IF criteria" (IF 1 and IF 2)
Basically I'm trying instead of having 3 buttons (one for patch #1 and two for criteria #1 and criteria #2), put everything on a single button only.
Thanks
Solved! Go to Solution.
This all sounds possible in the OnSelect of a single button. Without seeing your code and error message(s), we can only guess at the issue though. A few pointers that might help you spot a problem:
Make sure each function is separated by a semicolon:
Patch(
// Arguments for Patch here
);
ClearCollect(
// Arguments for ClearCollect here
);
If(
// Arguments for first If here
);
If(
// Arguments for second If here
);
Next, make sure the results coming out of your If() statements are appropriate for an OnSelect property. For example:
If( varNumber > 1, Red, Green)
This statement would not work in an OnSelect because it does not result in an action; it results in a color.
Hope that helps,
Bryan
This all sounds possible in the OnSelect of a single button. Without seeing your code and error message(s), we can only guess at the issue though. A few pointers that might help you spot a problem:
Make sure each function is separated by a semicolon:
Patch(
// Arguments for Patch here
);
ClearCollect(
// Arguments for ClearCollect here
);
If(
// Arguments for first If here
);
If(
// Arguments for second If here
);
Next, make sure the results coming out of your If() statements are appropriate for an OnSelect property. For example:
If( varNumber > 1, Red, Green)
This statement would not work in an OnSelect because it does not result in an action; it results in a color.
Hope that helps,
Bryan
User | Count |
---|---|
255 | |
112 | |
92 | |
48 | |
38 |