section_navigate
Section navigate allows navigating different sections in the widget to find get details. This will return the result from the action handler when the navigate action is performed.
Parameter | Description | Datatype | Max Limit |
type | Type of response - section_navigate | String | - |
section | List of sections - Metric, Fieldset, Info, Listing, Empty Section | Map | - |
failure_banner | Text to be displayed on the banner if the action was a failure | String | 50 |
refresh_section | whether to refresh the parent section by invoking the action handler with action type navigate_back while navigating back or to show the initial data itself. | Boolean | sa- |
Sample Script (Deluge):
if("navigate".equals(actionType))
{
elementName = action.get("name");
sectionName = target.get("section_name");
if("purchases".equals(sectionName))
{
for each listingElem in listing
{
if(elementName.equals(listingElem.get("name")))
{
itemStatus = listingElem.get("subtext").toList(" | ").get(0);
response.put("type","section_navigate");
infoSection = {"reference_id":listingElem.get("name"),"name":"purchaseInfo","title":"Item Details","layout":"info","data":{{"label":"Item Name","value":listingElem.get("text")},{"label":"Net Price","value":listingElem.get("title")},{"label":"Status","value":itemStatus}}};
if("Shipped".equals(itemStatus))
{
infoSection.put("actions",{{"label":"Cancel order","name":"cancelOrder"}});
}
response.put("section",infoSection);
return response;
}
}
}
}
}