I have a detail in my mobile section that should appear only if type de record is A !
How to Hide/Show detail in mobile based on a condition please ?
Like
1 comments
16:43 Nov 24, 2023
This should work for the embedded detail. You need to create a custom business rule to check the condition and then use something like:
var view = this.getView(); var panel = view.getPanel(); var type = record.get("UsrDriverCheckType"); var isNeededType = (type && type.getId() === "079acedd-585f-4a0e-aff0-eb419ec09925"); var panelItems = panel.getItems(); for (var i = 0, ln = panelItems.getCount(); i < ln; i++) { var item = panelItems.items[i]; if (item.getName() === "UsrSchema11DetailEmbeddedDetail") { var isItemHidden = item.getHidden(); if (type && isNeededType) { if (!isItemHidden) { item.setHidden(true); } } else if (type) { if (isItemHidden) { item.setHidden(false); } } } }
This should hide the detail with UsrSchema11DetailEmbeddedDetail name.
Show all comments