I want to hide the button if the return from REST SERVICE will be empty.
If the "whatsapp" from REST SERVICE will be empty, the app should hide the button with the name "whatsapp"
Thank you.
Try this:
click on js next to the whatlabel text field and add the following javascript:
pre
if (value === undefined) {
Apperyio("whatsapp").hide();
} else {
Apperyio("whatsapp").show();
}
return value;
/pre
Hopefully this will hide the whatsapp button if the corresponding data is empty
Run when I was put if (value === undefined || value === "").
Thanks a lot,
Terry, have a detail, the button is into list (list item) component. the system only considers the first button for hide. How I do for apply the hide for other buttons from list component? Is a array the buttons?
Glad i could help
Hi
Does not work for me. This only applies to the first value in the list. For some reason it is not repeated for all list items?
Can anyone help, pleas?
Thanks
It should work for all list items, try checking the value of 'value' in the js and then altering the code above.
Notice if (value === undefined) worked for me, but Josiel also needed to check for a null string if (value === undefined || value === "").
It might be that you are checking for the wrong value,