Hi
I've inserted a gallery that gets the data from a SharePoint List. I wanted to change the item image in the gallery so that if the Request Type is "Application Training Request", then I want to show "Image1.jpg". If the Request Type is "Service Support Request", I want to show "Image 2.jpg".
Both images are uploaded to the PowerApps Media
Solved! Go to Solution.
Hi @yjamous ,
If 'Request Type' is a Choice field, you need
Switch(
ThisItem.'Request Type'.Value,
"Application Training Request",
'Image 1',
"Service Support Request",
'Image 2'
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Ok, I used this instead and it worked 🙂
If( ThisItem.'Request Type'.Value="Service Support Request",'Image 1','Image 2')
But I wouldn't have figured it out without your post @WarrenBelz
Hi @yjamous ,
In the Image property, put something like this (the names may not be exactly correct)
Switch(
ThisItem.'Request Type',
"Application Training Request",
'Image 1',
"Service Support Request",
'Image 2'
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Set your Image property on the image to:
Switch(ThisItem.RequestType,
"Application Training Request", Image1,
"Service Support Request", Image2
)
This assumes you have imported the two images and they are named Image1 and Image2. Otherwise, adjust as needed.
I hope this is helpful for you.
Thanks @WarrenBelz
For some reason, it's not accepting the syntax.
By the way, the field I'm checking "Request Type" is dropdown in my SharePoint list. Not sure if this makes a difference.
Hi @yjamous ,
If 'Request Type' is a Choice field, you need
Switch(
ThisItem.'Request Type'.Value,
"Application Training Request",
'Image 1',
"Service Support Request",
'Image 2'
)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
That is not an error message! The formula editor is never able to evaluate expressions that have ThisItem in them.
Ok, I used this instead and it worked 🙂
If( ThisItem.'Request Type'.Value="Service Support Request",'Image 1','Image 2')
But I wouldn't have figured it out without your post @WarrenBelz
User | Count |
---|---|
122 | |
87 | |
86 | |
75 | |
67 |
User | Count |
---|---|
214 | |
181 | |
137 | |
96 | |
83 |