pls, what is wrong on this code? I want, when value in fieldname "termin" is empty then "Text42" show .... else when there is something value in "termin", it remains hidden
$w.onReady(function () {
$w("#repeater1").onItemReady( ($w, itemData, index) => { let items = $w("#dataset1").getCurrentItem().termin; if (items === "") { $w("#text42").show(); } else { $w("#text42").hide(); } });
Hi Man, (I think that I found what you try to do :)
Explanation: Dataset is the collection data. The current item not change on each container in the repeater. So in your case in onItemReady you can use the itemData in order to get your current container entity.
So change your code to the following and its should work:
$w("#repeater1").onItemReady( ($w, itemData, index) => { if (itemData.termin === "") { $w("#text46").show(); } else { $w("#text46").hide(); } });
GL, Erez