Hi Alexander, great this works in Beta4 in general.
One issue occurs when you create a new document set. Instead of NewForm.aspx, the file /_layouts/15/NewDocSet.aspx is called, and DFFS Reports “DFFS functionality will not be applied because you are attempting to load a non-existing list item (missing ID in the URL).”
Any idea?
This code example show how to pull user info from a people picker (single or multi select), and return the user info – either from the SharePoint userinfo list, or from the SharePoint userprofile service (not available in SP Foundation).
The code is written for user withe DFFS – in the Custom JS textarea.
// Use this code in NewForm or EditForm
$.each(spjs.utility.getFieldValue({"fin":"PeoplePicker1","key":"loginName"}),function(i,login){
var ppData = spjs.utility.userInfo(login);
console.log(ppData);
// User profile is not available in SP Foundation
var userProfile = spjs.utility.userProfile(login);
console.log(userProfile);
});
// Use this in DispForm
$.each(spjs.dffs.beforeProperties["PeoplePicker1_ID"],function(i,userId){
var ppData = spjs.utility.userInfo(userId);
console.log(ppData);
// User profile is not available in SP Foundation
var userProfile = spjs.utility.userProfile(ppData.Name);
console.log(userProfile);
});
Replace “PeoplePicker1” with your FieldInternalName.
Alexander
Hi Alexander
We have identified a slight issue with the functionality of the “Connect to list” element in the vLookup tab on DFFS.
Note that the field configuration will still work if you ignore the verify connection to list option, you just have to be careful with naming. So the overall functionality of DFFS and vlookup is unaffected, but the error on the list validation caused us to go round in a few circles.
Our setup comprises a top level site that contains all of the DFFS and vlookup code, and the backend config page. We then utilise sub sites below the top level site where we make use of DFFS on forms (each containing their own SPJS-DynamicFormsForSharePoint and SPJS-vLookupSettings lists).
We have found that when doing the vlookup config, {currentSite} in List base URL actually uses the top level site where the backend page is, and not the site on which the form is being used, so when you try to validate the connection to the list (in the sub site) you get a message to say the connection is invalid.
Would it be possible to pass the url of the actual site that the form is being used on into the backend vlookup configuration, so that {currentSite} would correctly connect to the list in question?
Adam
Hi Alexander
I think Jon’s scenario in the image and your example are slightly different in that Jon is targeting the same field (Channel) on the form twice – as far as I can see that’s an impossibility? Your example targets four completely separate fields – two pairs which cascade nicely.
Jon’s scenario translated into your example would equate to;
Casc1,Casc2
Casc1,Casc4
in the config for the current list fields. Am I missing something?
I think you’re just configuring this incorrectly – it looks like you’re targeting the same field (Channel) in both config sections, which would be impossible, and also using the same list of options for both primary and secondary exception code fields – possible but doesn’t sound likely. Is it really cascading dropdowns that you want?
To get a four level cascade, you simply list the four fields in the “lookup” list, and then the four fields in the form you want to populate – the “current” list.
From Alexander’s post;
lookupListFields: The FieldInternalNames of the fields in the above list.
thisListFields: The FieldInternalNames of the fields to convert to dropdowns.
And importantly:
The length of the arrays “lookupListFields” and “thisListFields” must be the same.
ie just pair up the from and to fields, and list them in the right order.
So in your lookup list field you’d have eg Column1,Column2,Column3,Column4
And in the current list field eg Primary,Secondary,Third,Fourth
See the original post
Thank you so very much for this awesome solution! One question – is there a way, once you upload the files and they are attached, to have a button (like the magnifier) that allows you to open the file, instead of opening the document library item properties it is associated with? I love that there is a way to see the properties, but I would like to be able to view the file from there as well (particularly images). Is there a way to set this up from the open form of the parent list?
How can I create a lookup column from another list and use the name for the list view or a list properties form?
Is there a way to use vLookup to upload multiple files (from new or edit forms) to a document library from a list item and add information in those files to relate them back to the list item? I understand if vLookup does not do this, but do you have any ideas on a work-around, maybe using a workflow, that could do this?
Is it possible to apply the vLookup Rowlimit and “Show more items label” on a list view? They seem to apply to the form view of an item, but not the list view.
Alexander,
The Subtotal field is still being cleared on function run. I’ve attempted the following:
1. Updated all DFFS files and plugins to December 14th, 2015 versions
2. Updated the following files to the January 03, 2016 BETA 1
DFFS_DirectToBackend.html
vLookup_ListView.html
vLookup_NewForm.html
SPJS-vLookup_backend.js
SPJS-vLookup_frontend.js
SPJS-vLookup_receiver.js
SPJS-utility.js
jquery.js
DFFS_backend_min.js
DFFS_frontend_min.js
This is my code:
fields = init_fields_v2();
function CalcTotal()
{
var vLookupTotal = $(".vLookup_Line_x0020_Total_vLookup").text();
setFieldValue('Subtotal',vLookupTotal);
//var Subtotal = getFieldValue('Subtotal');
//var Tax = getFieldValue('Sales_x0020_Tax');
//var Prod = ((Subtotal*Tax)/100);
//var TotalCalc = (+Prod + +Subtotal);
//var Subtotal = getFieldValue('Subtotal');
//setFieldValue('Total',TotalCalc);
}
-
This reply was modified 9 years, 4 months ago by
avala.
Hi, I’m new to DFFS. Many thanks for an excellent tool that I’m finding a lot better than trying to wrangle InfoPath!
I am trying to create a form that that changes fields depending on the “form type” required. This is for an approvals/rfi form.
The manual states that if I have a URL of the form:
https://myorg.sharepoint.com/my/path/list/newform.aspx?frmtype=rfi
I should be able to use
{url:frmtype}
to get the form type specified in the URL.
So in the visible fields and headings section I created a “heading” containing the following:
<p>Form Type: {url:frmtype}</p>
But the form type is never shown.
I assume I’m doing something wrong but I’m not sure what?
I’m using v4.360 with SharePoint Online.
Thanks, Julian.
Hey Alex,
Great solution I love it, trying to get my current company to invest in this.
I am looking at your trial and I noticed an error (see attached) that I cant figure out. I am using DFFS on two lists, A and B. A is the list that uses vLookup to List B. I have a value passed to a field in B and use your solution to hide that field on the new form. This is working correctly and the form and your tool appears to be functioning correctly however I only receive this error message when I click new item from the vlookup of List A. If I go to List B and click new item the form works fine with now error.
Please let me know if you have any insight.
Thank you
Rich
Hi,
I have started testing the latest version of DFFS (Dec 14, 2015) to see what is involved in upgrading some of the sites where I am currently using it, in Office 365.
I am testing out the JSLink option, and the only difference that I can see in my setup, is that I have installed the SPJS software in /SiteAssets/SPJS/DFFS instead of /SPJS/DFFS.
I have added the Site Column to a couple of lists.
What I am experiencing is that DFFS only seems to work the first time I load a page with it required, eg a list display form. When I select edit, I just get the standard form. However, if I refresh the page, then the DFFS form is displayed. I have tried this in both Edge, and IE with the same results.
Sounds like some form of caching, but I am not sure what. Any ideas as to where I should look? Bound to be something silly I have done.
Regards
Jeff
Hi,
Unfortunately there is no way to query into a list using JavaScript when the user doesn’t have read access. The only option I can think of where this might be possible is to use a SP Designer workflow running with an impersonation step to pull this extra information – but then the user must be able to input a “key” to user in the WF when looking up the correct record to fill in the values in the list item.
Another option could be to create the list with a “difficult” name, and hiding it from browsers in SP Designer (or using this tool). This will not prevent users typing in the correct address to the list accessing it, but it will “obfuscate” it.
Alexander
Hi,
Calculated columns are available in DispForm only. This is not a DFFS issue, but how calculated columns work in SP.
You can however make this work if you use the trigger “Custom JavaScript function”, and use a query to get the value from the calculated column.
Here is an example of getting the calculated column value:
function getCalculatedColumnValue(){
var r = false, v = "", qRes = spjs.utility.getItemByID(
{
"listName":_spPageContextInfo.pageListId,
"id":spjs.dffs.data.thisItemID,
"viewFields":["YourCalculatedColumn"]
}
);
if(qRes !== null){
v = qRes["YourCalculatedColumn"].split(";#")[0];
}
if(v === "The value you want to compare with"){
r = true;
}
return r;
}
This code is written “free-hand” and not tested, but it should work.
Alexander