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
Solved! Go to Solution.
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)
Result Test:
Hope this can be helpful.
Best Regards.
Yumia
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)
Result Test:
Hope this can be helpful.
Best Regards.
Yumia
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!
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
200 | |
183 | |
76 | |
46 | |
37 |
User | Count |
---|---|
325 | |
258 | |
123 | |
72 | |
58 |