-
Search Results
-
I set up a “lookup” list for populating a 3-level cascading dropdown field set. So, I am able to make a selection in field# 1, and field# 2 shows up and is populated with one or more choices. Then, I make a selection in field# 2, and field# 3 shows up and is populated with one or more choices. So this part works nicely.
The other nice feature is that when any field has only one choice, it is automatically selected. But the anomaly I am encountering is that when any choice is automatically selected in a field, the underlying SharePoint text-field is not populated. Only when I explicitly select a choice in a drop-down, the underlying field is populated with the same value. At first, I didn’t understand what was happening, but when I turned on the debug mode in the script, then I was able to see what was happening. A screenshot of the relevant part of the form is attached. The initialization script is as below:
spjs.casc.init({ lookupList:"Case Types Lookup", lookupListBaseUrl:L_Menu_BaseUrl, lookupListFields:["Title","Case_x0020_Library","Document_x0020_Type"], thisListFields:["Case_x0020_Type","Case_x0020_Library","Document_x0020_Type"], dropDownDefaultvalue:"", hideEmptyDropdowns:true, autoselectSingleOption:true, clearInvalidSelection:true, debug:true });
How do I get the underlying SharePoint field to have the same value as the auto-selected single option in the corresponding drop down field?
Thanks,
AshwinI have a site with an External List. The External List connects to a table on a MS SQL server. The table has a handful of columns that need to store hundreds and in some instances thousands of characters of data. The fields are used to store progress notes.
After configuring DFFS on the forms for this list, all of the varchar, nvarchar and text columns in the SQL table, regardless of their length, display as a single line of text on the forms. I would like to configure some of the fields on the forms to be multi-line but can’t seem to find any settings in DFFS to do so.
If DFFS can’t support forcing a field on an external list to display as multi-line, then is there a way to add a “temporary” field to the form that will show as multi-line. If that can be done, I figure that I could use a rule to move the data in the temporary field to the column on the external list when the form is being closed.
Topic: Button To Start Workflow?
Hey everyone,
I’ve had success previously with creating a button on my forms which sets a certain field to a value and saves the list item all in one click, which triggers a workflow based on the value.
However, I’m wondering if anyone knows of any way where if I have a workflow enabled to be started manually, if a button in a list item can be set to start the workflow on that item?
Thanks in advance for any help! 🙂
I got a question about summing the values from another column in a list connected with a multi lookup column. Here is the request:
I have a Product list that contains columns for product [Title] and the [Install hours] for that product.
On our Orders list I have a look up column where multiple products can be added to an order.
Based on the items added to that order, I would like the Install hours (on the products list) to be summed in another field in the orders list.
Here is a code example to get you started:
function lookupExtraColumnData(){ var a = [], b = [], c = 0; a.push("<Where>"); a.push("<In>"); a.push("<FieldRef Name='ID' />"); a.push("<Values>"); $("#dffs_LookupFieldName select:last option").each(function(i,o){ b.push("<Value Type='Number'>"+$(o).val()+"</Value>"); }); a.push(b.join("")); a.push("</Values>"); a.push("</In>"); a.push("</Where>"); if(b.length > 0){ var res = spjs.utility.queryItems({"listName":"ProductListDisplayName","query":a.join(""),"viewFields":["InstallHours"]}); $.each(res.items,function(i,item){ if(item.InstallHours !== null){ c += Number(item.InstallHours); } }); // set the value in a field setFieldValue("SumFieldName",c); } }
Add this function to the custom js textarea in DFFS backend, and call it for example on “save” using the “The form is saved” trigger.
You must change “LookupFieldName” for your lookup field name, the “ProductListDisplayName” with the display name or the GUID of the product list, the field name “InstallHours” with the actual field you want to sum, and the “SumFieldName” with the field to write the sum to.
Please note that the sum is written to a “static” field in the list item, and will not update on already added items if you update the “InstallHours” field in your products.
Hope this can be used as a staring point.
Alexander
Is there a way, in the parent form, to only load the automatically created data in the “_vLookupID” field if a folder has been created? I want to update data in the child list with data from the parent list as the parent list is updated (to show status, etc.) I want to use whether the “_vLookupID” field has data as a driver for this, so the workflow does not throw an error. Also, I think the loading of this data may be causing the form to load slower (I’m not sure of this, but is it possible?).
Hi Alexander,
Can you please provide the correct syntax to use multiple lookup columns on a form?
I’ve tried different variations, drop-downs are showing but no values are provided.
The single drop-down value for “CompanyName” worked perfectly.This is an example of what I’ve tried
“fieldToConvertToDropdown”:[“CompanyName”,”PositionTitle”],
“listName”:”Tasks”,
“listBaseUrl”:”/Sites/MySite”,
“optTextFieldInternalName”:”CompanyName”,”Position”,
“sortFieldName”:”CompanyName”,”Position”,The error I’m receiveing:
[LookupInTextField: Debug]
1.11
ListName: Tasks
Query: <Where><IsNotNull><FieldRef Name=’CompanyName,Position’ /></IsNotNull></Where><OrderBy><FieldRef Name=’CompanyName,Position’ Ascending=’TRUE’/></OrderBy>
ViewFields: ID,CompanyName,Position
Query returned -1 items.Thanks for your help.
Topic: Displaying other Rendition
SharePoint 2013 has a great feature where you can display different renditions of the same image. I have a list where each item has an “Item Icon”, an image to represent it. For most places where this icon is used I need a very small rendition, 100×100 px.
However, when a user clicks on the list item to view it, I would like them to see a larger version. What I need help with is a way to make the display form to show a larger rendition (only the display form, the edit and new forms can use the default rendition).
Currently the image that is displayed is this:
https://Contoso.sharepoint.com/Photo%20Library/image.jpg?RenditionID=5I need to change it to this:
https://Contoso.sharepoint.com/Photo%20Library/image.jpg?RenditionID=6Here is the information about the field:
Display Name: Item Icon
Internal Name: Item_x0020_Icon
Field Type: SPFieldImageNote that this type of field stores the information as “LinkTitle,LinkURL”. In my case it is stored as “Item Icon,https://Contoso.sharepoint.com/Photo%20Library/image.jpg?RenditionID=5”. When I try to put the field name into the HTML section like this “Item_x0020_Icon” it simply displays “Item Icon” on the form.
Any help would be appreciated. I am not all that great with JavaScript, just enough to see what is going on and make a few modifications. Here is an article on how somebody did this with a Content Search Web Part, I just haven’t figured out how to apply it to DFFS.
https://www.martinhatch.com/2013/08/customising-content-search-web-part.html