cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kudo Kingpin
Kudo Kingpin

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
Advocate I
Advocate I

Hi

 

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

CityDropDown.Selected.ID

Hope this helps you.

 

-Oleks

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

Community Champion
Community Champion

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.

@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
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Solution Authors
Top Kudoed Authors
Users online (16,180)