cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RyoIshi731
Helper IV
Helper IV

Change Display based on Value

Hi 

 

I would like to change visible/nonvisible based on the item selected.

In below picture,  if the Service Category Value includes Troubleshoot, I don't want to display 1.Symptom of trouble. 

 

RyoIshi731_4-1633606608501.png

 

 

 

 

Now questions are 

 1.     I write like this however error happens.

       If(ThisItem.'Service Category' ="*TroubleShooting*",false,true)

       The error says that data type is different. Since Service Category is table type, it is error?  How can I solve this error?

 

RyoIshi731_1-1633606387917.png

2.  I want to use wild card.  Is it possible in PowerApps?   If possible, how can I do it?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @RyoIshi731,

Have you solved your problem?

Do you want to make the data card invisible based on the Combo Box selected?

Could you please tell me more about your scenario?

 

Actually, make sure how you configure your Combo Box name in your Service Category data card. DataCardValue90 is the control from your Symptoms of Trouble data card, so please ensure the real data card value in your Service Category data card.

 

Please select the whole Symptoms of Trouble data card and set the Visible property as below:

If("TroubleShoot" in Concat(DataCardValue_Service_Category.SelectedItems,Value,","),false,true)

In addition, how to write the above formula depends on how you configure your dropdown of 'Service Category' Items property. 

 

What's more, to convert dropdown value to text, just use the Concat() function as the above formula wrote.

Best Regards,
Qi

View solution in original post

6 REPLIES 6
shoog
Dual Super User
Dual Super User

For the first one, you probably want to refer to the dropdown rather than ThisItem, so the visibility changes when someone changes the service category. The formula for Visible would be DataCardValue1.Selected.Name = "TroubleShooting" (replace DataCardValue1 with the appropriate control).

 

For the second question you are probably looking for the IsMatch function. If not, please clarify what you want to achieve.

@shoog   Thank you for your answer.


Sorry I still don't understand what should I write visible formula.  Error is happening.

The error message is saying that data type is different.

RyoIshi731_0-1633662758232.png

 

and could you explain more detail about this.

   (replace DataCardValue1 with the appropriate control)

What I want to do is to make 'Symptoms of Trouble 'invisible if the dropdown of 'Service Category' included "Troubleshooting". 

Sorry I am quite beginner.

@shoog 

>For the second question you are probably looking for the IsMatch function. If not, please clarify what you >want to achieve.

Yes, I think isMatch function.  If the 'Service Category' includes the "TroubleShooting" I want to display/not display certain datacard.  

However isMatch function can be used for text input?   'Service Category' is dropdown, so data type is table.

How can I convert data type from dropdown to text?

Hi @RyoIshi731,

Have you solved your problem?

Do you want to make the data card invisible based on the Combo Box selected?

Could you please tell me more about your scenario?

 

Actually, make sure how you configure your Combo Box name in your Service Category data card. DataCardValue90 is the control from your Symptoms of Trouble data card, so please ensure the real data card value in your Service Category data card.

 

Please select the whole Symptoms of Trouble data card and set the Visible property as below:

If("TroubleShoot" in Concat(DataCardValue_Service_Category.SelectedItems,Value,","),false,true)

In addition, how to write the above formula depends on how you configure your dropdown of 'Service Category' Items property. 

 

What's more, to convert dropdown value to text, just use the Concat() function as the above formula wrote.

Best Regards,
Qi

@v-qiaqi-msft   Thank you so much.

I could solve it by writing like this.

 

If("TroubleShoot" in Concat(DataCardValue85.SelectedItems,Value,","),false,true)

The Service Category is DataCardValue85. 

 

@v-qiaqi-msft   

 

Thank you.

Thanks to your advice I can do it what I want to do.

# Before select anything, screen is like this.

RyoIshi731_0-1634035722778.png

If I select 'Troubleshoot' in "service category" drop down, some items are disappeared like below picture.

However there is unnecessary space marked in Yellow.  This is not beatiful and is it possible to allign in nice way?  I don't want this space, "Project Name" should come right of Transportation.

RyoIshi731_2-1634035795586.png

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,547)