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

Notifications

Announcements

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,679 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,679 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,679 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,679 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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard