cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
UB400
Level 10

Form - Set default value for Control based on User selection of another Control on the same Form

I have a Form with several fields of which some get their values from Drop Downs that get their values from another Table.

 

For example if I'm populating an address Table, and in my Form I have a City Drop down which gets it's list of cities from a City Table, and in the same Form I have a Text field called CityID. I need to set the default value of the CityID field based on the City the User has selected from the City DropDown.

 

How can I do that when using a Form Control in edit mode?

4 REPLIES 4
Highlighted
Oleks
Level: Powered On

Re: Form - Set default value for Control based on User selection of another Control on the same Form

Hi

 

Set Default property of the Card control of the CityID field to

CityDropDown.Selected.ID

Hope this helps you.

 

-Oleks

UB400
Level 10

Re: Form - Set default value for Control based on User selection of another Control on the same Form

@OleksThanks for your answer. I had tried that and tried it again, but the momment I add the "." to the "CityDropDown" I get an error "invalid use of '.'"

 

What am I doing wrong? I selected the Card, looked up the "Default Value", and tried to enter it as you said but no luck.

 

I've done this numerous times with Patch (without using a Form), but am now trying to use Forms to reduce the amount of effort it takes to build Apps.

Meneghino
Level 10

Re: Form - Set default value for Control based on User selection of another Control on the same Form

Hi @UB400, just a passing comment.

As soon as there is any customisation, I have always found it much easier in the end to use the single controls and Patch rather than using forms.  With the abitlity to copy-paste controls and groups of controls within the app, I find the effort is ok.

I hope that @Oleks can still help you, however.

UB400
Level 10

Re: Form - Set default value for Control based on User selection of another Control on the same Form

@Meneghino I totally understand where you're coming from. I still struggle a lot with the formulas, it's getting better but not there yet. Which is why I was looking for an easier and quicker way to get Apps out of the door.

 

I do have to agree with you, that (atleast with my understanding) Forms can be limited, and Patch offers a lot of versatility.

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (4,892)