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 / Dropdown default prope...
Power Apps
Unanswered

Dropdown default property - Expected Record Value error

(1) ShareShare
ReportReport
Posted on by 920 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.
Categories:
I have the same question (0)
  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @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)
  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    @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,687 Super User 2024 Season 1 on at

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

     

    ["Pass","Fail"]

     

  • wonka1234 Profile Picture
    920 Super User 2024 Season 1 on at

    The items property is actually - 

    Choices([@'List Two'].'Senior Managers').  Which is a sharepoint list dropdown of email addresses.
  • Ami K Profile Picture
    15,687 Super User 2024 Season 1 on at

    @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
    920 Super User 2024 Season 1 on at

    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,687 Super User 2024 Season 1 on at

    @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: ""
     }
    )

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 342 Most Valuable Professional

#2
11manish Profile Picture

11manish 234

#3
Valantis Profile Picture

Valantis 187

Last 30 days Overall leaderboard