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.
Congratulations to our 2026 Super Stars!
Thanks to all of our 2025 Community Spotlight stars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
ManoVerse 212 Super User 2026 Season 1
CU11031447-0 100
NeerajPawar 68