Trying to get a widget to act as a first-level validator for my MRVS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I want to detect duplicate or contradictory entries in my MRVS before releasing the data to a Flow, and to start I want to use client-side JavaScript, Array methods and so on, to catch the most obvious problems. So I want to add a custom variable to my Item, and have it host a widget that $watches the mrvs. This is on my Australia PDI.
I added the widget to my item but the client controller never runs, even after stripping out everything but a console statement.
Here is what I did. In addition to my mrvs I added a Variable of type Custom.
There is nothing under Default Value. I see a few mentions of populating this field as part of this effort, but none are clear enough to be actionable.
The controller:
I started out with a proper $scope.$watch setup and so on, but nothing happened and it showed no sign of monitoring my mrvs, so at length I stripped it down as you see here, but still nothing happens.
Have I overlooked something?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
You can use Catalog Client Script and validate the data before submission. Any specific reason for using the Widget?
Thank you,
Palani
Palani
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I want to provide immediate feedback before the user even submits, such as if when they add a row that contradicts an existing row - for example if row 3 says to remove Bob as approver on all tasks when row 1 says to add Bob as an approver on XYZ tasks. I want that to run as soon as a row is added or edited, so I can display a summary of problems with the data, and the row numbers. The MRVS event model seems not to support this, hence the need for a widget with a $scope.$watch setup in the controller, watching the mrvs variable. There are many, many articles and posts on this topic but when I try it nothing happens.
