Notifications
Announcements
No record found.
I'm writing what should be a simple JavaScript web resource to show/hide several fields on a form based on a few conditions, but I'm getting an error that doesn't make any sense. I've done this exact same thing a few times before, using formContext.getAttribute(<field name>).setVisilbe(<true/false>); but now I am getting an error saying that this function doesn't exist. I am able to hide tabs and sections of the form, but not individual fields. Is this a bug or was there a recent change to this function? We're supposed to have this working for our customers tomorrow. Any help would be greatly appreciated!
Hi,
Try this:
formContext.getControl(arg).setVisible(bool);
And remember to pass the executionContext to your function
Hello Allyh,
You can also use Business rules to show / hide fields based on certain actions. You can find more details about Business rules here - docs.microsoft.com/.../create-business-rules-recommendations-apply-logic-form
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Tom_Gioielli 70 Super User 2025 Season 2
Gerardo RenterÃa Ga... 33 Most Valuable Professional
Daniyal Khaleel 32 Most Valuable Professional