cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
thatakke
Helper II
Helper II

Clear text if selection is changed

Hello,

 

I'm building a roster app and I have a Skills dropdown that based on the selections, a box in which people can add additional details appear (per skill). For example, if people select MS Office in the drop down, a box like the one below appears. The app finally patches the data to a SharePoint list and a view form displays the entered data, where people can go back and edit, if necessary.

thatakke_0-1631265259374.png

 

Let's say I selected MS office, entered some text to the box, later, I decide to uncheck "MS Office", obviously, the additional details box disappears, but the text entered stays intact, so in the view form, users see that MS Office is not checked but there is a box with additional details added. To overcome this, I changed the Text value of the "MS Office box" to

 

 

If(!IsBlank(LookUp(SkillsDropDown.SelectedItems, Text(Value) ="MS Office")), Parent.Default, Blank())

 

 

I have two questions here:

  • Is there a better way of doing this? I hoped there would be a "Clear" function, but it doesn't seem to exist.
    • In relation to this, currently the Data Card's Display mode has this function, so it appears disabled if there is no text. 

 

If(IsBlank(ThisItem.'MS Office Additional'),Disabled,View)​

 

  • There are more than 10 skills in the drop down, and I do not want to add the same formula to each skill's box. I would also rather do this from the edit form screen, not the view form. Any suggestions?

Many thanks,

 

1 ACCEPTED SOLUTION

Accepted Solutions
Nogueira1306
Community Champion
Community Champion

So.. If I understood right, when someone adds a skill in the extra textinput you and after it removes it from the skills combobox, you want to remove the extra text input. 
So, try this:

 

If(!IsBlank(LookUp(SkillsDropDown.SelectedItems, Text(Value) = TextInput.Text)), Parent.Default, Blank())

 

So, if one of the values equals the one in text input it goes Blank(), if not, Parent.Default

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

View solution in original post

2 REPLIES 2
Nogueira1306
Community Champion
Community Champion

So.. If I understood right, when someone adds a skill in the extra textinput you and after it removes it from the skills combobox, you want to remove the extra text input. 
So, try this:

 

If(!IsBlank(LookUp(SkillsDropDown.SelectedItems, Text(Value) = TextInput.Text)), Parent.Default, Blank())

 

So, if one of the values equals the one in text input it goes Blank(), if not, Parent.Default

 

If you need additional help please tag me in your reply and please like my reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️!

Best regards,
Gonçalo Nogueira

Check my LinkedIn!

Check my User Group (pt-PT)!

View solution in original post

Many thanks @Nogueira1306 

 

Simple and clear.

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

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