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

Formula for Blank

I have a dropdown.  When in form mode "new", it is to set the value to "Select  One", when editing parent.default.  However, what if the value has a "blank" parent.default?  What is the correct formula to include if the value is blank , pick "Select  One".  At present, the blank items default to the first entry.

 

Thanks in advance for any advice anyone can provide.

Capture.JPG

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Formula for Blank

I was able to solve this issue.

4 REPLIES 4

Re: Formula for Blank

I was able to solve this issue.

sopatte
Level: Powered On

Re: Formula for Blank

Elaborate?

Community Support Team
Community Support Team

Re: Formula for Blank

Hi @TerrificTerri,

 

 What data source do you use?

Do you want to if it is new, the dropdown’s default shows “select one” and if the item is null it is also shows “select one”?

 If yes I think you need add “select one” as one item of the dropdown.

 

You can try following workaround.

I test with SP list as data source:

Data Source:

20190206Employformula (my SP list name)

EmployeeFullName(Choice type)

JobTitle (Choice type)

 20190206Employeeformulasp1.png

Then PowerAppsàCreate an app

 

App Test:

Change IconNewItem1.OnSelect:

NewForm(EditForm1);Navigate(EditScreen1, ScreenTransition.None);ClearCollect(MyCollection, '20190206Employformula'.EmployeeFullName);ClearCollect(test1,AddColumns(MyCollection,"EmployeeFullName1",EmployeeFullName.Value));ClearCollect(Test2,{EmployeeFullName1:"Select One"});Collect(Test2,test1.EmployeeFullName1)

20190206Employeeformulaapptest1.jpg

DataCardValue5.Items: Test2.EmployeeFullName1

20190206employeeformulaapptest2.jpg

DataCardValue5. DefaultSelectedItems: If(EditForm1.Mode=FormMode.New,First(Test2.EmployeeFullName1),If(!IsBlank(Parent.Default),Parent.Default,First(Test2.EmployeeFullName1)))

20190206employeeformulaapptest3.jpg

 

Result Test:

20190206employeeselectoneresulttest2.gif

 

Hope this can be helpful.

Best Regards.

Yumia

sopatte
Level: Powered On

Re: Formula for Blank

Might be as simple setting the following Default formula:
If(IsBlank(Parent.Default),"Select One",Parent.Default)