-
Search Results
-
Hello,
I am using DFFS for a SharePoint Online list. I have CustomJS that pulls data from another SharePoint List(Staff Master List). I am getting $().SPServices is not a function .I have added the JQuery Reference on Site Assets & also referenced them on the text area above the CustomJS.
Seems like JQuery is not getting loaded, but not sure how to resolve.function setDemoValues() { var PreferredName = ""; $.each(spjs.utility.getFieldValue({"fin":"Employee_x0020_Name","key":"loginName"}),function(i,login){ var userProfile = spjs.utility.userProfile(login); PreferredName = userProfile.PreferredName; setFieldValue('Title', PreferredName); }); var query = "<Query><Where><Eq><FieldRef Name='Name' /><Value Type='User'>" +PreferredName + "</Value></Eq></Where></Query>"; var camlViewFields = "<ViewFields><FieldRef Name='Reports_x0020_To'/><FieldRef Name='Department'/><FieldRef Name='Position'/><FieldRef Name='Job_x0020_Title'/></ViewFields>"; $().SPServices({ operation: "GetListItems", async: false, webURL: "http://xxxx/yyyyyyyy", listName: "Staff Master List", CAMLViewFields: camlViewFields, CAMLQuery:query, completefunc: function(xData, Status) { $(xData.responseXML).SPFilterNode("z:row").each(function() { if ($(this).attr("ows_Reports_x0020_To")) { TeamLeadr_str = $(this).attr("ows_Reports_x0020_To").split(';#')[1]; setFieldValue('Reports_x0020_To',TeamLeadr_str); } if ($(this).attr("ows_Department")) { setFieldValue('Department', $(this).attr("ows_Department")); } if ($(this).attr("ows_Position")) { setFieldValue('Position', $(this).attr("ows_Position")); } if ($(this).attr("ows_Job_x0020_Title")) { setFieldValue('Position_x0020_Level', $(this).attr("ows_Job_x0020_Title")); } }); } }); }
Alex,
I’m unsure what is happening, but my autocomplete field no longer retains its values.I’m running in a newer version of Chrome. I’m using the subsite with the troublesome “&” in its name that doesn’t encode to a %26. The field is a standard text field that brings report IDs (numeric) from the lookup list. It’s multi-select with a separator of “; “ It’s the same configuration as another working site.
When I select an item in the AC, the number(s) show up under the field as I would expect. When I do a getFieldValue on it I get ‘’. If I save, they don’t save with it. I commented out the AC code, did a plain type of the report ID, and ran the same getFieldValue and the ID returned.
I’ve made no changes to it and just noticed ut today after it had been working fine prior.
I have a lookup column that shows choices from another list.
For example
My first list contains a column for “office” and a column for “postcode”
In my second list I have a lookup to the first list and show the “office” value but I also want the postcode to be placed into another text column in the second list.Is there an easy way to retrieve “other” columns from the first into the scond list?
(I’m sure there is!)
Topic: Custom JS examples
Topic: VLOOKUP
Hi Alex,
Background
We have two lists connected through Vlookup , List A and List B. Basically List A is a leave request form and List B keeps records leave days taken and remainder etc.(print screens annexed).Objective
a)To display 2 columns on New Form from List B which are connected to list A through
Vlookup. Remainder & Leave days to be takenb) To prevent user from saving the forms if the remainder of leave days is not enough. I tried to create a Javascript code that will basically make calculations based on two columns from list B (leave taken & remainder) and one column from List A (days taken). Basically to say if (leave taken + days taken > remainder ) then an alert is made “no enough leave days etc and the form is not saved (submitted. However this giving an error, that bring me to another question.
It is possible to get Field Values from columns of another list connected through Vlookup.? through getFieldValue?I hope i was clear.
I cannot get the below custom-js to save to my lookup list. I have tried a few things to trouble-shoot. 1) Permissions are good 2) Thought perhaps when the Display Name is different from FIN it would make a difference so tested with another field with both the same – didn’t make any difference 3) Tried turning isLookupInSelf = false, and 4) tried adding to the lookup list with spjs-lookup which worked just fine. I recently installed v4.4.3.45 but had not put this code into any previous version so I don’t know if it worked before I upgraded. We have SP2013 back end (server) but still SP2010 front end. I tried in a SP2013 evaluation site but kept getting SOAP errors. My code is below and I have attached a screenshot of field and the console error message I received, however I received this error message in Google Chrome but not IE11; new item was not saved in either browser. Any thoughts? Thank you, as always.
spjs.ac.textField({
“applyTo”: “Company”,
“helpText”: “Start typing to search for Company”,
“loadText”: “”,
“listGuid”: “69B37C20-7963-420C-94A1-97F8E9C5DEF9”,
“listBaseUrl”: “/sites/DCO/ACDC/ACDCDev”,
“showField”: “Title”,
“searchFields”: [],
“filterCAML”: “”,
“useREST”: false,
“preloadData”:false,
“filterREST”: “”,
“optionDetailFields”: [],
“optionDetailPrefix”: [],
“enforceUniqueValues”: true,
“rowLimit”: 15,
“listOptionsOnFocus”: false,
“minLengthBeforeSearch”: 3,
“reValidateOnLoad”: false,
“allowAddNew”: true,
“isLookupInSelf”: true,
“addNewAdditionalFields”: [],
“multiselect”: false,
“multiselectSeparator”: “; “,
“orderBy”: {
“fin”: “Title”,
“ascending”: true
},
“setFields”: [],
“debug”: true
});Topic: Show and Hide Fields
I have recently upgraded and getting a feel for the new version. In my current forms I have the ability to show and hide fields when they are selected which is working. What doesn’t work is if I am in a form and I select one thing and then change the selection to something else, it doesn’t automatically hide the fields that are not needed. it shows both sets of fields for the first selected option then fields for the option it is changed to also.
When Add/Modify/Remove values is selected in Type of Request – Agent Data Groups the following field visible and required
◦Add/Modify/Remove Values from which ADG
◦New/Modify/Remove AD Value
◦MU Number and NameWhen New ADG is selected in Type of Request – Agent Data Groups the following field visible and required
◦Name of New ADG
◦New/Modify/Remove AD Value
◦MU Number and Name
◦Business Need for New ADGIf I toggle between the 2 selected values in the old version it would hide the fields not listed as visible and required.. Can someone help me on how this version would allow me to do the same. Do I need to write the rules differently? The user would have to refresh the page to get the correct field if a mistake or another selection was made within the same field