0
votes

I am using the Collect function to insert a new record into a Sharepoint list using PowerApps. There is a Gallery with a list of values from another Sharepoint List. I want to use the Selected value from the Gallery to set one of the fields in the Insert List.

I thought it would be as easy as this:

Collect('Concert Log List',{Attendee: BrowseGallery1.Selected});

Essentially I want to add a new record to the Content Log List and reference the Attendee (which is the lookup list) every time the Attendee is referenced. Now the field just ends up being blank.

2

2 Answers

0
votes

Hm. Gallery1.Selected represents the entire record in the Sharepoint List. Can you add another . to Selected to get to the actual field you want to write?

Gallery1.Selected.Attendee (or the like)

0
votes

Got it:

Patch('Child List',
  Defaults('Child List'), 
  {
    Title:"test",
    ParentItem:
      {
        Id:Gallery1.Selected.ID,
        Value:Gallery1.Selected.Title
      }
  }
)