cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Community Support
Community Support

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
Community Support
Community Support

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

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. 

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
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (5,334)