Forum Replies Created
-
AuthorPosts
-
November 22, 2024 at 12:01 in reply to: Embedded List Webpart – Cannot read properties of null (reading ‘closest’) #38328
Thanks Alexander, fast turnaround as always. V1.0.74.0 installed and issue resolved.
November 19, 2024 at 18:55 in reply to: Embedded List Webpart – Cannot read properties of null (reading ‘closest’) #38314That’s great, thank you.
September 15, 2024 at 14:42 in reply to: Modern DFFS not loading for some users- ‘listBaseTemplate’ #38098That’s great, thank you. I’ll install it and give it a try but I probably won’t get much feedback from users until later in the week.
Was it caused by the Microsoft changes to lists? Do you know why it affected some users but not others?Thank you, that would be great. If you need any more info please let me know.
Thank you Alexander !
Works perfectly. Great answer and speedy reply as always.
Excellent as always Alexander. I think I need to update to the latest version.
I think this is really useful, so might be worth including as an option in the core DFFS package. The last thing you want after setting up logic on a form is to have someone bypass it, especially if you don’t realise that they have.
I’m not quite sure I follow exactly what you’re doing, but there’s an option in the UI to only set the field value if the destination field isn’t empty. See screenshot.
Does that help?Attachments:
I think I would just do a newform rule triggered on form load to populate the field with {currentUser}. All done in the rule config.
March 29, 2019 at 17:11 in reply to: Reference Org Chart data for a user from a form using JS #24544I’ve got a people picker field that I use to get the manager ID from directly from the person’s profile properties. I cant remember exactly what I did to create the code, but it was probably based on https://spjsblog.com/forums/topic/pull-user-info-from-a-people-picker/
function getManager(){
// Use this code in NewForm or EditForm
$.each(spjs.utility.getFieldValue({“fin”:”Employee”,”key”:”loginName”}),function(i,login){
ppData = spjs.utility.userInfo(login);
//console.log(ppData);
// User profile is not available in SP Foundation
userProfile = spjs.utility.userProfile(login).Manager;
userProfileManager = spjs.utility.userProfile(login).Manager;
//console.log(“Manager:”+userProfileManager);
setFieldValue (“Manager”,userProfileManager);
});
};I then call getManager with an on change rule for the Employee people picker. The manager gets written to the manager people picker (read only)
Adam
I actually use DFFS “save and redirect” on newform for most of my projects now. See attached screenshots.
Newform config is minimal, requesting only basic information in order to create the item, all of the more complex form logic and configuration is on editform.
End users don’t really notice the continuation of the form after the redirect, and I don’t have to manage the separate form config on both newform and editform. Obviously once in editform you can use the item ID wherever you need to.Attachments:
Thanks Alexander
What I’ve done as a workaround is left the field that needs to be unique as it is (essentially the accountName taken from a people picker and a value from a choice field joined together), so SharePoint takes care of enforcing unique values.
For the vLookup I’ve swapped from using the unique field on it’s own as the filter to using the people picker AND the choice field as filters. The end result is the same.
It’s actually quite a neat solution that stops users getting to the point of saving and finding that they can’t do so.
Excellent functionality made possible by DFFS.Thanks for the fast reply.
I’ve been doing some more testing of this, it looks like is it javascript/json escape characters causing the issue, but not quite as I was expecting.A backslash on it’s own causes the error – it’s expecting a valid escape code because the backslash is there. Backslash followed by a non escape code character generates the error message and kills the vLookup.
A backslash as a valid escape code ( \n \r \\ etc) doesn’t error, and the whole string is then successfully used in the vlookup query.
For example; domain\rtester works as \r is a valid escape code.I’ve attached some more screenshots to help illustrate. Firefox gives a slightly different error message to IE, specifically calling out a “bad escaped character”
Any ideas?
Adam
Attachments:
This would be possible with standard vLookup wouldn’t it?
Add a new vLookup column and then build a vlookup query to look at the same list (list:Assignments filter fields:assigned/pending etc), choose the fields (Employee, District) to display. Sort by ID descending and set the row limit to 10.
Have you tried turning on debug including the presave debug option under rules? When you change the field you should be able to see the rules trigger and when you click save see the emails generated (or not).
-
AuthorPosts