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 the Default of the...
Power Apps
Unanswered

Set the Default of the Content Type Drop Down

(0) ShareShare
ReportReport
Posted on by

I am attempting to use the Content Type DDL and the Navigate functions to transition between screens.  Each screen has the Content Type DDL in it but I need each of those cards to default to the name of the content type they are for.

 

How do I get a DDL to default to a specific value?  I'm not sure if I'm supposed to default to datacard somewhere or the datacardvalue.  I'd think datacardvalue.

For the datacardvalue I have tried using the default field.  If I use text it gives the error :  "Expected Record Value".  I figure this is because its a DDL and the values are Id,Value pair.  

 

I'm just struggling with how to get the default value.  I just keep getting errors.  I'm not sure the syntax I need.

 

Could anyone demonstrate how to default the value?

 

 

 

Categories:
  • mdevaney Profile Picture
    29,993 Moderator on at

    @ComputerHabit2 

    You must be using a Combobox instead of a Dropdown control.  A Combobox requires a record as input whereas a Dropdown requires a value (text, number, etc.) as input.

     

    To get the Content Type Combobox to default to a specific value, click on the DataCard that holds the Combobox and change the Default property to

     

    LookUp(your_datasource_name,your_field_name="your_text_string")

    I don't know what your data looks like but in psuedocode it's something like this

     

    LookUp(myDataTable,contentType="drawings")

     

    ---
    Please click "Accept as Solution" if my response helped to solve your issue so that others may find it more quickly. If your thought the post was helpful please give it a "Thumbs Up."

  • ComputerHabit2 Profile Picture
    on at

    I'm attemtping to use the ContentType.  It appears to be a DDL.

    Choices([@'QA Database'].'{ContentType}')

  • ComputerHabit2 Profile Picture
    on at

    I was able to set the default.

    I set the DefaultSelectedValue property to:

     

    { '@odata.type' : "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedContentType",
    Id:"0x0100CC4EA32BE1FC014E9C40217D9F8B250800B6DD0C3DC4DA3E40A76B725B3FCFD053",
    Value:  "ContentType1"}
     
     
     
     
  • mdevaney Profile Picture
    29,993 Moderator on at

    @ComputerHabit2 

    Good thinking!  I'm glad you solved the issue.

  • ComputerHabit2 Profile Picture
    on at

    I'm still a little stuck.  The defaultselected values are showing correctly.

     

    When I switch between screens the ContentType selected on one form needs to be populated on the other form.  

     

    I have setup a global variable that updates whenever the content type is changed.  I'm reading that through IF Statements to navigate to the correct form.  

     

    OnChange =
    Set( CurrentContentType, DataCardValue1.Selected.Name);If(CurrentContentType = "ContentType1",Navigate(FormScreen1,ScreenTransition.None));If(CurrentContentType = "ContentType2",Navigate(FormScreen2,ScreenTransition.None))

    This works but when I get to the other form the ContentType DDL needs to reflect what the user selected.  I thought by defaulting the DefaultSelected I would always get the right value but that doesn't seem to be the case.

     

    How do I update the default value when the other page is navigate to?

     

     

     

     

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 339 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 289

#3
Mohsin Ali Profile Picture

Mohsin Ali 228

Last 30 days Overall leaderboard