
Announcements
‘hello,
I have btc field on form on Tab1 and Tab2 , same control on 2 separate tabs
when I am using below code it is hiding on default Tab1 but not tab2 , How can I hide same control on both tabs using below code?
function hideControlBasedOnCondition(executionContext)
{ var formContext = executionContext.getFormContext();
var conditionMet = true;
var control = formContext.getControl("btc");
if (conditionMet) {
control.setVisible(false);
else { control.setVisible(true); } }
Thanks,
Hi @Shafdev,
You can iterate through all controls bound to a column on a form.
formContext.getAttribute("<attributeName>").controls.forEach(control => control.setVisible(false));
Replace <attributeName> with the logical name of your column.
---
Please click Accept as Solution if my post answered your question. This will help others find solutions to similar questions. If you like my post and/or find it helpful, please consider giving it a Thumbs Up.