web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Create new SP list ite...
Power Apps
Answered

Create new SP list item including value in lookup column

(0) ShareShare
ReportReport
Posted on by

Hi

I want to create an attendance register for a music group.  I have a Sharepoint list "Current members" - each item is a unique member of the group,  with columns including name, address plus a unique ID column.   I have a second Sharepoint List "Rehearsal attendance" where each item includes columns "Rehearsal date", a lookup column ("Member") that links back to the "Current members" list and a Yes/No column "Attended".  I want to be able to create a new item in the "Rehearsal attendance" list for every  member for every rehearsal date, to show whether a group member attended a particular rehearsal.   

 

On one screen I have a Gallery to browse the "Current members" list.  I want to select a member from the Gallery and populate an Edit Form (in New mode) to create a new item in the "Rehearsal attendance" list, with default values:  "Rehearsal date" is today(), "Member" is the member selected from the Gallery (lookup) and "Attended" is true.  

 

How can I set the default value of the Edit Form control for the "Member" lookup to be the correct lookup value for the member selected in the Gallery?  Thanks for any ideas/links to documentation.

Categories:
I have the same question (0)
  • Ramole Profile Picture
    Super User 2024 Season 1 on at

    Hi @StigMil 

    Just use a lookup please have look here 

    Filter, Search, and LookUp functions in Power Apps 

  • WarrenBelz Profile Picture
    156,327 Most Valuable Professional on at

    Hi @StigMil ,

    Firstly please ask yourself why you need to use the Lookup type column when you can do the same thing in Power Apps without all the unnecessary complications and restrictions - I have a blog on data structure that may assist.

    However to answer your question, if this is a Combo Box (you did not specify) you need to refer to the valid output in the DefaultSelecteditems. So if it was (I am only guessing the value as you have not provided the Items)

    ComboBoxName.Selected.Member

    it would be 

    {Value:ComboBoxName.Selected.Member}

     

    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.

  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @StigMil ,

     

    So you are selecting from the members Gallery and navigate to the NewForm which links to the other list as data source, the Member column is a LookUp column in the Rehearsal attendance list so in the Form there should be a MemberDataCard contains a DataCardValue which is a Combobox, with Items property 

    Choices('Rehearsal attendance'.Member)

     

    Since you would like to auto-populate the Combobox with the member selected in the Gallery, you will need to use the LookUp function:

    LookUp(Choices('Rehearsal attendance'.Member), Value = Gallery.Selected.Name)

     

    Besides, you could save the selected member name in a variable OnSelect of the arrow icon in the Gallery:

    Set(varName, ThisItem.Name)

    Then the formula for DefaultSelectedItems of the Combo box will be:

    LookUp(Choices('Rehearsal attendance'.Member), Value = varName)

     

    Hope this helps.

     

    Best regards,

    Community Support Team _ Jeffer Ni
    If this post helps, then please consider Accept it as the solution to help the other members find it.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 392 Most Valuable Professional

#2
11manish Profile Picture

11manish 181 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 112 Super User 2026 Season 2

Last 30 days Overall leaderboard