cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Shivani1000
New Member

Checkbox values to display

I have a gallery which contains checkbox that take values from collection. The same gallery is present for edit and create items. When the user click on edit he should get the checked values in the checkbox which he has selected earlier. How can I achieve this?

1 ACCEPTED SOLUTION

Accepted Solutions
v-qiaqi-msft
Community Support
Community Support

Hi @Shivani1000,

Do you want to make the Checkbox display checked values when clicking the edit icon?

Could you please share a bit more about the scenario, is there an ID column within?

I have a test for you, please take a try as below:

Add an edit icon and set the OnSelect as below:

Set(ItemId,ThisItem.ID)

Set all the controls's DisplayMode like: 

If(ItemId=ThisItem.ID,DisplayMode.Edit,View)

Set the Checkbox Default property as below:

If(
    Checkbox1.DisplayMode = Edit,
    If(
        IsBlank(ThisItem.Price),// Here is how I set the Checkbox display text, please replace it with yours.
        false,
        true
    )
)
Best Regards,
Qi

View solution in original post

2 REPLIES 2
RusselThomas
Microsoft
Microsoft

Hi @Shivani1000 ,

The Default: property of the checkbox should be set to whatever field is recording the checkbox value.  The assumption here is that you are saving the value of the checkbox to your source?

So for example, if your checkbox value is being saved as true or false into the Yes/No column "checkBoxColumn", then the Default: property of the checkbox should be;

ThisItem.checkBoxColumn

 In Edit mode then the checkbox should be set to whatever is saved in source by default.

Hope this helps,

RT

v-qiaqi-msft
Community Support
Community Support

Hi @Shivani1000,

Do you want to make the Checkbox display checked values when clicking the edit icon?

Could you please share a bit more about the scenario, is there an ID column within?

I have a test for you, please take a try as below:

Add an edit icon and set the OnSelect as below:

Set(ItemId,ThisItem.ID)

Set all the controls's DisplayMode like: 

If(ItemId=ThisItem.ID,DisplayMode.Edit,View)

Set the Checkbox Default property as below:

If(
    Checkbox1.DisplayMode = Edit,
    If(
        IsBlank(ThisItem.Price),// Here is how I set the Checkbox display text, please replace it with yours.
        false,
        true
    )
)
Best Regards,
Qi

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,035)