How to Display message in the Snack Bar

I need to display message in the Snack Bar.
Basically, on the basis of condition I want to show the message fetched from an API in the snack bar.

2 Likes

As you want to Display the message of the basis of Success or Failure, getting response from an API.

Need to follow these steps in the API task:

  1. You will have to provide the ‘Success Key Path’ along with the ‘Success Value’.
  2. Provide the ‘Failure Message Path’. So that it can fetch the required message from there.
  3. Then submit it.
    For instance:

Success key path -

getVal("tempObject.AP_CREATE_RECORD.status")

Success Value -

success

Failure Message path -

getVal("tempObject.AP_CREATE_RECORD.error.message")

4 Likes

Welcome to the community Akshit!