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 / Set default value for ...
Power Apps
Unanswered

Set default value for choice box with sharepoint lookup column

(0) ShareShare
ReportReport
Posted on by 16

Hello everyone,

 

I have created a simple datamodel in sharepoint by referencing other lists through lookup columns. In my app I now want to automatically set the default value of a choice box by a global variable. The variable contains the ID of the record I want to reference. I know I can create a record [variable] and set this as the defaultselecteditems to that record. The correct ID then appears but after submitting the ID does not appear in the sharepoint list.

What am I doing wrong here?

 

Thanks for your help, Lukas

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

    @LukasR Can you share the formulas you have in the default property of this combobox and also the update property of the datacard that holds this combobox.

  • LukasR Profile Picture
    16 on at

    Hello,

     

    these are the settings of the combobox.

    LukasR_0-1626365737072.png

     

    and this is whats in the update property,

    LukasR_1-1626365785734.png

     

     

    Thanks for your help,

    Lukas

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @LukasR The DefaultSelectedItems can't be just an ID, it has to be a table with the record that you want. So you have to do a Filter and find the matching record,

    Filter([@Putendaten_EinstallDaten], DurchgangsID=CalId)

  • LukasR Profile Picture
    16 on at

    @CNTThanks for your reply. I tried that, too, but get the error that I cannot compare a record (DurchgangsID) to a text (CalID).

     

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @LukasR Looks like DurchgangsID is a LookUp. Then you will have to have, DurchgangsID.theID (rename it to the correct name)

  • LukasR Profile Picture
    16 on at

    @CNTYes, DurchgangsID is a Lookup, that looks up the ID of the referenced list and I need that ID to be the defaultselecteditem. So what is the correct formula for that?

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @LukasR What is the datasource for the EditForm?

  • LukasR Profile Picture
    16 on at

    @CNTthe datasource for the EditForm ist Putendaten_Einstalldaten and it looksup the ID of the list "Putendaten_Durchgang"

  • CNT Profile Picture
    10,921 Super User 2024 Season 1 on at

    @LukasR If DurchgangsID is a LookUp to "Putendaten_Durchgang" which has an ID column then try this,

    Filter([@Putendaten_EinstallDaten], DurchgangsID.ID=CalId)

  • LukasR Profile Picture
    16 on at

    @CNTI'm sorry, it's so difficult with me!

     

    This still doesn't work. I get the error message that the Name DurchgangsID.ID is not valid and it doesn't recognize the identifier. I double checked the column name "DurchgangsID" in "Putendaten_Einstalldaten" and there is an "ID" in the lookedup list "Putendaten_Durchgang".

     

    LukasR_0-1626503949693.png

     

    I somehow think, I have to filter the Putendaten_Durchgang list. Isn't that the correct record i want to get???

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 846

#2
Valantis Profile Picture

Valantis 532

#3
Haque Profile Picture

Haque 410

Last 30 days Overall leaderboard