Show/hide layer depending on response from api interface asset

Hi @it15,

I recommend you to check this sample that may fit perfectly for what you’re trying to achieve: Giphy API

In the Experience, we make a request on Giphy API based on a Text Input value.

When the API returns an error or no results, we hide some layers and show others.
Feel free to download, test and dig in!

When requests failed (check the conditions) :

When no results (check the conditions) :

Regards,

Alex.

1 Like