Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Dropdown default property - Expected Record Value error

(1) ShareShare
ReportReport
Posted on by 909 Super User 2024 Season 1

hi ,

 

I am trying to set a default in a dropdown based on another data card.

 

I am getting an error on this -

 

If(DataCardValue18.Text = "Louis" , "Pass", "Fail")
 
Why am I getting this error?  The DataCard18 value is a lookup formula, not sure if that would affect it.
  • Ami K Profile Picture
    15,665 Super User 2024 Season 1 on at
    Re: Dropdown default property - Expected Record Value error

    @wonka1234 - assuming you're not actually trying to return gmail accounts, on the DefaultSelectedItems property of that ComboBox, use:

     

    With(
     {
     _get_email: Switch(
     DataCardValue18.Text,
     "Louis",
     "Louis.Stevens@yourcompany.com",
     "Red",
     "Ren.Stevens@yourcompany.com"
     )
     },
     {
     Claims: "i:0#.f|membership|" & _get_email,
     Department: "",
     DisplayName: "",
     Email: _get_email,
     JobTitle: "",
     Picture: ""
     }
    )
  • wonka1234 Profile Picture
    909 Super User 2024 Season 1 on at
    Re: Dropdown default property - Expected Record Value error

    Sorry I made a mistake, 

     

    I want the if statement like so - 

     

    If(DataCardValue18.Text = "Louis" , "Louis.Stevens@gmail.com", If(DataCardValue18.Text = "Ren", "Ren.Stevens@gmail.com, "")

  • Ami K Profile Picture
    15,665 Super User 2024 Season 1 on at
    Re: Dropdown default property - Expected Record Value error

    @wonka1234 - sorry I am no longer following what you're trying to do.

     

    As I understand it, you want the ComboBox to default to "pass" or "fail", but you have set up the Items property of that ComboBox to return different values?

  • wonka1234 Profile Picture
    909 Super User 2024 Season 1 on at
    Re: Dropdown default property - Expected Record Value error

    The items property is actually - 

    Choices([@'List Two'].'Senior Managers').  Which is a sharepoint list dropdown of email addresses.
  • Ami K Profile Picture
    15,665 Super User 2024 Season 1 on at
    Re: Dropdown default property - Expected Record Value error

    @wonka1234 - and what do you have in the Items property of that ComboBox? I assume its:

     

    ["Pass","Fail"]

     

  • wonka1234 Profile Picture
    909 Super User 2024 Season 1 on at
    Re: Dropdown default property - Expected Record Value error

    @Amik 

     

    Data Source is Sharepoint List.

     

    The data im trying to populate actually is in a combo box!

     

    Formula is - 

    LookUp([@'MASTER LIST'],'Job Title' = DataCardValue32_1.Selected.Value,'Team Name').
    Which does populate the word "Louis" in Datacardvalue18.
  • Ami K Profile Picture
    15,665 Super User 2024 Season 1 on at
    Re: Dropdown default property - Expected Record Value error

    @wonka1234 -

     

    • What is your data source (SharePoint, Dataverse, SQL etc)
    • Is that actually a Dropdown control, or a ComboBox control?
    • Could you share the LookUp formula used in DataCardValue18 (assume this is a TextInput control)

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,658 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard