cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

Edit gallery information

Here is my question: How can users edit existing notes in a gallery? Below is are the details and screen captures.

 

I have the following scenario:

1. Notes screen displays information that has been collected from multiple meetings for one company (Notes = SharePoint list where company is a lookup field to Organization in SharePoint LIST2)

2. Organization is based on a combo box dropdown from previous screen. 

3. Notes for the selected company are display via a gallery (gallery_Notes)

4. New notes can be added for this organization (form_NewNote).

5. Once a new note has been added, the gallery_Notes is updated with the most recent note at the top. 

 

gallery_Notes

ITEMS = Sort(Filter(Notes,OrganizationNOTES.Value = ComboBox2.Selected.Organization),MtgDate, Descending)

Notes screen.PNG

If users select button to "Add New Meeting Information," a popup form collects the information. Information is added to the Notes SharePoint list. I have the organization field hidden on this form but below is the information: 

UPDATE: = {'@odata.type':"#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"Id:ComboBox2.Selected.ID,

Value:ComboBox2.Selected.Organization}
DEFAULT = ThisItem.OrganizationNOTES (organization is lookup field to SharePoint LIST2)
 
Save Meeting Details Button: 
SUBMIT: SubmitForm(form_NewNote); Refresh(Notes); UpdateContext({Popup: false})

Popup screen.PNG

 

Thank you!!

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @tjtaylor1164 

Try deleting the date card from the form and then adding it back in again.  If that doesn't work please post a screenshot of the edit form.

View solution in original post

6 REPLIES 6
Super User II
Super User II

Hi @tjtaylor1164 

First, the Item property of the NewNote Form should be Lookup(Notes, ID=gallery_Notes.Selected.ID).  This is important for editing the form but is ignored for new forms. It specifies the record in your list that is being edited as the one selected in your gallery.

Next put a > icon inside the gallery so that it appears with each item; make its OnSelect property:  EditForm(form_NewNote); UpdateContext({Popup:true}).  This will bring up the popup edit form and the form will be populated by the information in the selected item in the gallery. The EditForm(form_NewNote) sets the form's mode to Edit.  To open the form in New mode, NewForm(form_NewNote);UpdateContext({Popup: true}) should be in Add New Meeting button that creates a new note to ensure that the form opens in New mode. 

 

Currently your Save button is SUBMIT: SubmitForm(form_NewNote); Refresh(Notes); UpdateContext({Popup: false}).  It should only have SubmitForm(form_NewNote) in this button.  The Refresh(Notes); UpdateContext({Popup: false}) commands should be in the OnSuccess property of the form.  You don't want these commands chained to the form submission button because they will execute regardless of whether the form is successfully submitted.  By using the OnSuccess property,  the popup will disappear only if the form is submitted successfully.  

I apologize but I think I'm confused. 

 

You mention "Next put a > icon inside the gallery so that it appears with each item; make its OnSelect property:  EditForm(form_NewNote); UpdateContext({Popup:true})"

 

I did a quick screen capture of a small part of my gallery:

Example.PNG

As an example, this means I would add the icon beneath "lbl_FollowupLead3Notes"? And then do that for each one? (Anything that has Heading in the title is just the text included in front of the label.)

 

So then if they user wants to edit the third note in the example below dated 4/9, it would pull up the correct information.

Notes screen.PNG

 

 

@tjtaylor1164 

Put a > icon in the first item of the gallery.  It will propagate down the entire gallery.  It is used to select the record in the gallery.Annotation 2020-04-30 163311.png

Thanks! That's what I originally did but it didn't work so I was second guessing myself.

 

I just created a new gallery with the same information with an icon and it works fine. 

 

Just one more quick question, when I go in to edit meeting info, it doesn't keep the date information. 

 

Thanks you so, so much.

Hi @tjtaylor1164 

Try deleting the date card from the form and then adding it back in again.  If that doesn't work please post a screenshot of the edit form.

View solution in original post

That worked!! Thank you!

 

 

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 Kudoed Authors
Users online (69,295)