Forum Replies Created
-
AuthorPosts
-
To close this topic, is there DFFS syntax to add actual field control programmatically?
I understand that control’s values can be added as {<control_name>} and {{<control_name>}}. Say if my control is a choice dropdown, is there a way to add it vs writing the whole HTML?Awesome, Alex, thanks!
BTW,spjs.dffs.beforeProperties
is a hidden gem!
Thanks Alex,
In my scenario the rule checks if current user is the one in peoplepicker. That’s where the error happens. Do I understand correctly that I cant use the rule trigger for that and have to use javascript function to compare current user with peoplepicker?The preferred solution would be to allow rules on every field present in list definition regardless of which content type it belongs to.
Alex,
That’s pretty much what I’ve tried. Yet, Even when the rule is NOT a match, DFFS error still thrown as if the rule is processed. Here’re snapshotsAttachments:
Seems its a specific bug. When this error occurs, it prevents cascading dropdowns render
- This reply was modified 5 years, 9 months ago by Leonid.
Got it figured out. The problem was that my INIT rule that set all fields READONLY was triggered on FORM IS READY instead of FORM LOADED. Switching the trigger event did the trick.
adding snapshot with debug message. The field shows HIDDEN although it isn’t set hidden initially
Attachments:
Thx Alex, 500ms delay helped. Debug now shows Visible fields in the message window.
Back to original question on how to Toggle READONLY/VISIBLE field with the rule. With one rule, the field only shows (as editable) when the rule fires, and doesn’t show at all when rule doesn’t fire, even the field is listed on the TAB. Do I need to create a 2nd rule with opposite criteria and use ReadOnly fields there, or theres a way to accomplish Toggle with a single rule?
That seems like a good workaround. Ill give it a try. FYI: in my scenario I’m creating a range of list items in a different list referencing newly created item in the current list. Will probably put a spinning wheel on an Edit form while those are created.
Thanks!FYI: I went laborious way to do post-save actions with SPD workflow
Thanks Alex, works like a charm! What exactly “#dffs_” does at run time? – back to DFFS API 🙂
Right, Alex, just a regular Lookup field named “Groups”, with enabled multi-value selection.
The field is a lookup to another list. I’d like to pull not just selected values from the source list, but also selected items’ IDs.getFieldValue("Groups")
only returns Values.
Wondering if there is a DFFS function to get value pairs or IDs.
I understand that if nothing else, I can runspjs.utility.queryItems()
passing selected Values in CAML, but that seems too cumbersome just to get IDs.
Please advise.Attachments:
Thanks Alex! How do you configure VStudio to work with DFFS API, and how you test run custom scripts in VS before copying them into Custom JS? Appreciate your recommendation!
-
AuthorPosts