239
Views
3
Comments
Solved
Dynamically change local image
Question
Application Type
Mobile
Service Studio Version
11.53.19 (Build 61407)
Platform Version
11.17.1 (Build 36834)

I'm currently trying to  figure out how I dynamically can change a local image depending on which input that is given without using a lot of IF-statements.


Does anyone know if this is possible? 


Thanks, best regards Steven.

2023-08-28 09-08-29
Venkatesh Sundarajan
Solution

Hi Steven,

You can use the Switch case statement on the onchange/onblur event of your input box.

Since you mentioned local image, you can select the Type as "External URL" and you can map the "Runtime Path" of the image which you saved in Images folder under interface tab.


When value is "1" in input box,

When value is "2" in input box,

This worked for me. Attached the OAP file. Please check.

Hope this helpls!

Thanks.

DynamicLocalImage.oap
2022-10-17 18-34-06
Steven Erixon

Hi! Venkatesh, this might be what I was looking for. Let me test it in my own solution and I'll come back and mark it as resolved if this fixed my issue :)


Thank you for the quick reply! Me gusta!

2023-08-28 09-08-29
Venkatesh Sundarajan
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.