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

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

15 REPLIES 15
Highlighted

@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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
Highlighted

@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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

Highlighted

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)

 

 

 

Highlighted

@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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
Highlighted

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

Highlighted

@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. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (8,124)