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

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

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

johnchill
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
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

Top Solution Authors
Top Kudoed Authors
Users online (7,361)