I (try to) create an app for a evaluation process more or less as a check list. There are 9 main categories in it. Every category in it have 3 checkboxes. It's only allowed select one checkbox for each category. As a data source I used a Sharepoint list. The list columns are formatted as numbers. On this columns based other calculated columns. When I create a new record with a "New Form" I can select one of the checkboxes in every main category. So far so good. I save the recordset by using the "standard" PA functionality submit. If I try to change an existing recordset via the "Edit Form", I have some trouble with the right program code. When the "Edit Form" was opened, the existing values should be set a the checkboxes "Default". As you can see in the attached image. If I like to change the checkbox default e.g. the red who is correspondent with the SP Column "KAT3_1", I check an other checkbox, e.g. the green. Then this checkbox value, should be the "new default" so to say.
I set the default value of the checkbox like that: e.g.
Default = If(Checkbox_KAT1_1 Or Checkbox_KAT2_1 = true, false, Parent.Default)
The "OnCheck" property of every checkbox I set to: Reset(Checkbox_KATx_x); Reset(Checkbox_KAT_x_x)
But It doesn't work as I (as a Power Apps Starter - more or less) expected.
Maybe you have a more "professional" solution for my issue. Thank you in advance for some help.
Default = If(Checkbox_KAT1_1 Or Checkbox_KAT2_1 = true, false, Parent.Default)
That if statement is not correct for 3 reasons;
In the end, the default property should be;
Default = If(Checkbox_KAT1_1.Value=true || Checkbox_KAT2_1.Value=true, false, Parent.Default)
Pro-tip - if the variable is a true/false (AKA "boolean"), you don't need the "=true" because it is already true or false :). The final product would be:
Default = If(Checkbox_KAT1_1.Value || Checkbox_KAT2_1.Value, false, Parent.Default)
Let me know if you have questions!
Thank you very much. I will check it on coming Monday at work. I will inform you ASAP.
Sorry first for delayed answer.
I do this as a first step. I can select 2 checkboxes then 😞
PS:
I use the Text property of the checkboxes to get a number, because the Share Point Column is formatted as a number. Maybe a bit to complicated but it works well.
If I try this, it works like I expected, but only when I use it for 1 checkbox. If I try to this for the other 2 checkboxes, a error message comes up.
This is the error message that I've got
Any ideas?
User | Count |
---|---|
161 | |
86 | |
68 | |
63 | |
61 |
User | Count |
---|---|
212 | |
146 | |
92 | |
81 | |
68 |