cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Post Prodigy
Post Prodigy

Checkbox Selected Items Visibility

Hi All

 

I have a gallery within a data card, within that gallery there is a checkbox. The next datacard on the form I would like to set its visibility based on the selected checkbox of the first datacard. The user can select multiple checkbox therefore it needs to flexible. Can anyone show how they have achieved this before?

 

Thanks in advance

 

16 REPLIES 16
Super User II
Super User II

@Kmayes 

Please see the discussionhttps://powerusers.microsoft.com/t5/Building-Power-Apps/Gallery-inside-Data-Form-no-longer-selectabl... 

As my mom said to my sister,

"Just because you can do something doesn't mean you should do something".

 

This isnt covering the issue I am facing?

@Kmayes 

True but it addresses the problem of putting a gallery inside a form.  I think you will need to build your own form and use Patch() to save the data.  See @Meneghino 's blog https://baizini-it.com/blog/index.php/2017/09/28/powerapps-101-create-your-own-forms/  for instructions on how to do this.

Hi @Kmayes ,

If I understand you correctly, you want to show the control if any of the checkboxes are selected? Put this on the Visible of the control.

CountRows(
    Filter(
        YourGalleryName.AllItems,
        YourCheckboxName.Value
    )
) > 0

Bear in mind @Drrickryp 's comments and if you cannot select anything, then this code will obviously not work (and there is no solution). Also I do not believe you can presently add a gallery to a data card (so it has obviously changed).

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Post Prodigy
Post Prodigy

@Drrickryp @WarrenBelz I have now built it without using the a gallery within a card.

However I don't know if you can help on my next issue?

For the cards that have checkbox's within a card I have built collections and then patched those to my data source, which works great.

The issue I am facing is when the end user wants to edit the record how do I get the checkbox to show if it was previously checked? Within a card there is multiple checkbox's below is an example of one within my form, the on check and uncheck is set as follows: ClearCollect(SUPPLY,If(Checkbox11.Value, "Missed"),If(Checkbox12.Value, "Shared"));ClearCollect(SUPPLY,Filter(SUPPLY,!IsBlank(Value)))

I need it set this way as I need the text in the data source. So what i need to do in effect is if the checkbox "Missed" was originally checked show this as checked in edit mode, do you know how I can achieve this? 

 

Your help would be greatly appreciated 🙂

 

Kmayes_0-1608544119235.png

 

Hi @Kmayes ,

The way I would recommend is to ditch the Check boxes and put in a Radio Control with the Items

["Missed","Shared"]

Put a Text Field (I will call it SupplyStatus) in your data source linked to this card - remove the text box and put in the Radio Control (I will call it rcSupply) and make the Update of the Card

rcSupply.Value

The Default of rcSupply would be 

ThisItem.SupplyStatus

You would then capture the user's input and it would be returned in View and Edit modes.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Unfortunately it needs to be checkboxes as needs to be able to select more than one item and that cant be achieved with radio buttons

 

@Kmayes ,

I will be offline for a while now - what you are asking is not straightforward - I will leave you to @Drrickryp if he has the time.

Post Prodigy
Post Prodigy

@Drrickryp If you do have the time it would be appreciated 🙂

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Solution Authors
Top Kudoed Authors
Users online (95,577)