cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JR-BejeweledOne
Super User
Super User

Gallery In Forms revisit

I am working on a customized SharePoint form.   The customer requirement is for checkboxes rather than a combobox for the multi-select choice columns.  It would be much easier if I could just do a custom app, but they use the SharePoint alert feature heavily and need the ability to go to the app right from the Alert, so a custom form is the only solution here.

 

So, you have the Eureka moment when you think you have figured out the solution to your problem, only to lose an engine a little while later.    I didn’t completely crash, but still have an issue and can’t quite figure out what I am missing.

 

I have put a gallery into the form and setup the checkbox for the multi-select.    The issue is while it allows me to select multiple items, it’s only saving the last item selected.  I didn’t think I needed to do any sort of concat or concatenation to save the values since it’s a form, but I am obviously missing something.   I can tell that the issue is most likely with the ChoicesDataCard1 Update property.   Gallery.Selected is a record, but I think it needs a table and I am not sure how to get the selected items from the gallery into the table format that it needs.

 

Here is what I have:

 

GalleryChoices

  CheckboxChoices

 

GalleryChoices Properties:

 

                Items: Choices(PowerAppsData.Choices)

 

CheckboxChoices Properties:

 

OnCheck:  Select(Parent)

OnSelect: ThisItem.Value

Default:  If(IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected),false,ThisItem.Value in SharePointIntegration.Selected.Choices.Value)

 

If(IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected),false,ThisItem.Value in SharePointIntegration.Selected.Choices.Value)

 

ChoicesDataCard1 Properties

 

                Update: GalleryChoices.Selected



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
15 REPLIES 15

@JR-BejeweledOne 

FYI - I'm still reviewing this.  It appears that the Gallery no longer functions properly in an EditForm DataCard.  More to come.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

@JR-BejeweledOne 

Okay...I've flushed this out.  

There is an issue with a Gallery in an EditForm datacard (one might call it a bug).  I will put together a more exhaustive report and submit it to the team to review.

I found that when the Gallery is in the DataCard, normal operations on it seem to reflect other values that are not accurate.

So, relying on filtering the list and specifically the AllItems property of the gallery is not an option at this time.

 

Options are as follows:

1) Abandon Gallery concept

   Challenges....what other choice would be an option?

 

2) Place Gallery external to EditForm and reflect the Update property of the datacard to the external Gallery

   Challenges....if your EditForm scrolls, placing the Gallery can be a challenge.

 

3) Utilize a series of collect statements to gather the results.

   Challenges...need to reset collection and base it on current record choice values.  Need to implement more formulas to accomplish.

 

So that's what's on the table at the moment.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

So I was able to create a collection in the OnCheck property and a Remove in the OnUncheck property.  The update was quite simple after that.

 

OnCheck:

Collect(colCheckboxes,

{
Choices: CheckboxChoices,
Value: ThisItem.Value
}
);

 

 

OnUncheck:

Remove(
colCheckboxes,
LookUp(colCheckboxes, Choices = CheckboxChoices)
)

 

ChoicesDataCard1 Update:

 

colCheckboxes.Value

 

Along with this checkbox default property:

If(IsBlank(SharePointIntegration.Selected) || IsEmpty(SharePointIntegration.Selected),false,ThisItem.Value in SharePointIntegration.Selected.Choices.Value)

 

 

 



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

@JR-BejeweledOne 

Yes...the Gallery in the Edit form is a bug (in my opinion).  I did some research and it appears to be an issue for quite some time.  Chalk that one up to lessons learned!

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

If they would just give us a true multi-select checkbox control, we wouldn't have to do this workaround.



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.

@JR-BejeweledOne 

Agreed!!  Or better yet, the ability to use Components in an EditForm and/or a Gallery!  Then you can make your own desired look and action and use it in those places.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

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.

Top Solution Authors
Users online (1,409)