cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

New record in form drop down list or text entry

Hello, I have a form for entering new records. I want the person to be able to either select from a drop down list OR use a textinput to enter a new value for the same field as the dropdown. They should only be able to use one or the other, not both.

 

Any guideance is appreciated!

 

John

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: New record in form drop down list or text entry

Hi @johnchill,

 

Do you want the person create new record only use textinput or dropdown?

I think you can try following workaround:

 

App Test:

Firstly, you should make the dropdown’s default as blank,  and then you can use it as the judge condition.

The icon1.OnSelect in the Edit Form is : NewForm(Form1);Navigate(Screen3,ScreenTransition.None);ClearCollect(dropdownwithblank,{Title:" "});Collect(dropdownwithblank,'20190205FilterByUserEmail'.Title)

You can also add one button and then set its OnSelect: ClearCollect(dropdownwithblank,{Title:" "});Collect(dropdownwithblank,'20190205FilterByUserEmail'.Title)  

Then Dropdown2.Items: dropdownwithblank.Title (Then you can set its default value as blank)

          Dropdown2.Visible: If(!IsBlank(DataCardValue1.Text),false,true)

         DataCardValue1.Visible: If(Dropdown2.Selected.Value <> " ",false,true)

20190205newrecordindropdownortextinput.jpg

 

Result Test:

20190205onlytextinputordropdown.gif

 

 

Hope this can be helpful.

Best Regards.

Yumia

View solution in original post

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: New record in form drop down list or text entry

Hi @johnchill,

 

Do you want the person create new record only use textinput or dropdown?

I think you can try following workaround:

 

App Test:

Firstly, you should make the dropdown’s default as blank,  and then you can use it as the judge condition.

The icon1.OnSelect in the Edit Form is : NewForm(Form1);Navigate(Screen3,ScreenTransition.None);ClearCollect(dropdownwithblank,{Title:" "});Collect(dropdownwithblank,'20190205FilterByUserEmail'.Title)

You can also add one button and then set its OnSelect: ClearCollect(dropdownwithblank,{Title:" "});Collect(dropdownwithblank,'20190205FilterByUserEmail'.Title)  

Then Dropdown2.Items: dropdownwithblank.Title (Then you can set its default value as blank)

          Dropdown2.Visible: If(!IsBlank(DataCardValue1.Text),false,true)

         DataCardValue1.Visible: If(Dropdown2.Selected.Value <> " ",false,true)

20190205newrecordindropdownortextinput.jpg

 

Result Test:

20190205onlytextinputordropdown.gif

 

 

Hope this can be helpful.

Best Regards.

Yumia

View solution in original post

Highlighted
Frequent Visitor

Re: New record in form drop down list or text entry

That worked perfectly, thank you. 

 

Now, when I save, it only saves the value from the drop down list, not if I enter a value into the text box. 

Highlighted
Frequent Visitor

Re: New record in form drop down list or text entry

I got it. I had to put an IF statement in the datacard's Update property and it works perfectly:

If((Dropdown8.Selected.Value<> " "),Dropdown8.Selected.Value,TextInput2.Text)

Thank you!

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

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.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,225)