How do you count the amount of text boxes checked in a label. I think it would be CountRows(Checkbox. ---, but I am not sure what comes next because I don't see a selected or check option. ClearCollect(
col,
{Result: "All"}
);
Collect(
col,
Sort(
Distinct(
CCB,
'Functional Area'
),
Result
)
); ClearCollect(
colCCB,
AddColumns(
CCB,
"Checked",
false
)
);
I already have this in my on visible for the screen.
If(ThisItem.Title in Filter('CCB Voting','Created By'.Email = varUser.Email).Title || ThisItem.ID in TempCollection.Value, true,false)
This statement is in my default for the checkboxes. It populates the data previously selected by the user so their past selections are there. I need the label to still display however many are currently checked even if the user hasnt checked any new ones since reloading the app.
Solved! Go to Solution.
Hi @powerapps890 ,
Regarding your original issue, you just want to count the checked Checkboxed inside your Gallery, I think the formula I provided above could achieve your needs. Please try it, check if it could help.
If the solution I provided above could solve your original issue, please consider go ahead to click "Accept as Solution" to identify my reply as helpful.
For your latest reply, I think it is related to another issue that you want to fix. If you want to restrict the user checking only 10 Checkboxes at most, please try the following workaround:
Add a Label (Label1) outside the Gallery, set the Text property to following:
CountRows(Filter(Gallery1.AllItems, Checkbox1.Value=true))
Set the visible property of the Label to following:
false
Set the DisplayMode property of the Checkbox in your Gallery to following:
If(
Value(Label1.Text) = 10,
DisplayMode.Disabled,
DisplayMode.Edit
)
you could consider add a "Reset" button outside the Gallery, set the OnSelect property to following:
Set(IsReset, false);Set(IsReset, true)
set the Reset property of the Checkbox inside the Gallery to following:
IsReset
Please try above solution, check if the issue is solved.
If you still have other issue related your scenario, please consider close this thread, then open a new thread in our community, then we could help you there.
Best regards,
Hi @powerapps890 ,
Do you want to count the amount of Checkbox which is checked inside your Gallery?
If you add a Checkbox control inside a Gallery control, and you want to count the amount of Checkbox which is checked inside your Gallery, please try the following formula:
Set the Text property of the Label to following:
CountRows(
Filter(
Gallery1.AllItems, // Gallery1 represrnts the Gallery in your app, please replace it with your own Gallery name
Checkbox1.Value = true
)
)
Please take a try with above formula, hopes it could solve your problem.
Best regards,
Filter(
CCB,
If(
IsBlank(ComboBox1.Selected.Result) || ComboBox1.Selected.Result = "All",
true,
'Functional Area' in ComboBox1.SelectedItems
) &&
If(
IsBlank(Filter.Text),
true,
Filter.Text in 'Requirement Source'
) &&
If(
IsBlank(Search_.Text),
true,
Search_.Text in Name
)
)
This doesnt I think because I already filter in my items in the gallery. I only allow 10 selected boxes by the user and when you go back in the app after submitting it wont let you check anymore boxes than you previously checked even though you are allowed to select 10 in the code. @v-xida-msft
Hi @powerapps890 ,
Regarding your original issue, you just want to count the checked Checkboxed inside your Gallery, I think the formula I provided above could achieve your needs. Please try it, check if it could help.
If the solution I provided above could solve your original issue, please consider go ahead to click "Accept as Solution" to identify my reply as helpful.
For your latest reply, I think it is related to another issue that you want to fix. If you want to restrict the user checking only 10 Checkboxes at most, please try the following workaround:
Add a Label (Label1) outside the Gallery, set the Text property to following:
CountRows(Filter(Gallery1.AllItems, Checkbox1.Value=true))
Set the visible property of the Label to following:
false
Set the DisplayMode property of the Checkbox in your Gallery to following:
If(
Value(Label1.Text) = 10,
DisplayMode.Disabled,
DisplayMode.Edit
)
you could consider add a "Reset" button outside the Gallery, set the OnSelect property to following:
Set(IsReset, false);Set(IsReset, true)
set the Reset property of the Checkbox inside the Gallery to following:
IsReset
Please try above solution, check if the issue is solved.
If you still have other issue related your scenario, please consider close this thread, then open a new thread in our community, then we could help you there.
Best regards,
User | Count |
---|---|
221 | |
99 | |
94 | |
55 | |
34 |
User | Count |
---|---|
273 | |
106 | |
105 | |
60 | |
60 |