cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ComputerHabit2
Resolver I
Resolver I

Set the Default of the Content Type Drop Down

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?

 

 

 

5 REPLIES 5
mdevaney
Super User III
Super User III

@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."

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

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

I was able to set the default.

I set the DefaultSelectedValue property to:

 

{ '@odata.type' : "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedContentType",
Id:"0x0100CC4EA32BE1FC014E9C40217D9F8B250800B6DD0C3DC4DA3E40A76B725B3FCFD053",
Value:  "ContentType1"}
 
 
 
 

@ComputerHabit2 

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

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?

 

 

 

 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (43,460)