cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
shal2522
Helper III
Helper III

Deleting the selection from a dropdown

When user deletes a value from a dropdown field  – I want another field to default to a value.

How do I go about this in powerapps?

1 ACCEPTED SOLUTION

Accepted Solutions

@shal2522,

Do you mean DataCards/Fields in the form?

Then Yes, select the form, in the Properties section click on edit fields. Select the field that you want to reorder, Drag or move it to up / down, your field will be reordered.

 

If I answered your question, then please mark it as a solution ✔️ ; will help others.

View solution in original post

22 REPLIES 22
ArchitectMadhan
Super User
Super User

Hi @shal2522 ,

Could you explain your scenario with the screenshot if possible?

- Architect Madhan

Please click the "Accept as Solution" button and give thumbs up, if it is helpful to you.
shal2522
Helper III
Helper III

I have a dropdown field called machine type  with values

A

B

D

and another field where it defaults to the name of the person the machine is assigned to.

Say machine type has been selected as 'A' and I want that field to be blank.When I select Blank I want the assigned to be defaulted to organization name instead of individual person

shal2522
Helper III
Helper III

Will this work ?
If(
DataCardValue15.Selected.Value = "-" || DataCardValue9.Selected. Value = "ABC "
)

VishuS
Super User
Super User

Hi @shal2522,

Please share more details with a screenshot. So it will be easier to understand your issue.

 

When you change DropDown value to Blank from A, B, C or D. then the OnChange property of Dropdown Set one variable and assign its value as Organization name. Then on the Default property of your text field apply this variable.

OnChange= If(DropDown.Selected.Value="Blank" || IsBlank(DropDown.Selected.Value),Set(VarOrg,OrganizationName.Value));

Text=If(DropDown.Selected.Value="Blank" || IsBlank(DropDown.Selected.Value),VarOrg,Person.DisplayName);

 

Hope it will helpful to you, tag me for more.. And mark as a solution ✔️ if this post helps to resolve your issue.

shal2522
Helper III
Helper III

shal2522_0-1648492911878.png

wHEN BLANK IS SELECTED IN MACHINE TYPE ASSIGNED TO SHOULD DEFAULTTO ORGANIZATION NAME

Hi @shal2522

It will be better, if you provide more details about AssignedTo field. Is it Text field or DropDown? and the Organization value is come from which field/Column?

Try this,

Text=If(DataCardValue15.Selected.Value = "-" || DataCardValue9.Selected. Value = "ABC " || IsBlank(DataCardValue15.Selected.Value) ||  IsBlank(DataCardValue9.Selected.Value),'Organization name',PersonName);

shal2522
Helper III
Helper III

Its a text field and we can hardcode organization  name

 

I am new to powerapp  can you explain where I should add this

Text=If(DataCardValue15.Selected.Value = "-" || DataCardValue9.Selected. Value = "ABC " || IsBlank(DataCardValue15.Selected.Value) ||  IsBlank(DataCardValue9.Selected.Value),'Organization name',PersonName);

shal2522
Helper III
Helper III

I get a error in the formula message

@shal2522 ,

Add this to the default property of the TextInput or  Text property of the label that you have used for the AssignedTo property.

If(DataCardValue15.Selected.Value = "-" || DataCardValue9.Selected. Value = "ABC " || IsBlank(DataCardValue15.Selected.Value) ||  IsBlank(DataCardValue9.Selected.Value),"Text to Hard Coded value for your organization",PersonName);
// here PersonName is for else condition.
 

  Example: refer screenshot below;

VishuS_0-1648494212568.png

You have to add your logical formula on the default property of the TextInput/ Text property of Label under AssignedTo field.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Top Kudoed Authors
Users online (1,423)