Forum Replies Created
-
AuthorPosts
-
AdamPParticipant
Thank you Alexander !
Works perfectly. Great answer and speedy reply as always.
AdamPParticipantExcellent as always Alexander. I think I need to update to the latest version.
AdamPParticipantI 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.
AdamPParticipantI’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:
AdamPParticipantI 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 #24544AdamPParticipantI’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
AdamPParticipantI 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:
AdamPParticipantThanks 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.AdamPParticipantThanks 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:
AdamPParticipantThis 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.
AdamPParticipantHave 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).
AdamPParticipantHi Mike
Have you tried creating the HTML string in the body of the message?
The tooltip on the body field says;
Subject and Body
This value can be a plain text or HTML. See help tab for instructions on how to use MUI.You can use the current value from a field in the message by using the FieldInternalName in curly braces like this:
{NameOfField}
ItemLink
Use this in the Body to insert a link to the current items DispForm or EditForm:
{viewitemlink}
{edititemlink}
You can wrap it in an anchor tag like this:<a href="{viewitemlink}">Link to item</a>
So try;
<a href="{viewitemlink}">{Title}</a>
Adam
- This reply was modified 5 years, 4 months ago by AdamP.
November 7, 2018 at 09:50 in reply to: DFFS Backend problem – IE11 and SP2010 after DFFS_2018-07-31 #22722AdamPParticipantThanks Alexander, great support as always
AdamPParticipantHave you explored the Field CSS tab in config?
https://spjsblog.com/dffs/dffs-user-manual/#Field_CSSAdamPParticipantThanks Alexander, and well done on tracking it down.
The tab workaround works…it’s enough to just select “configure tabs” and save, no other tab setup needed.Adam
Attachments:
-
AuthorPosts