MikeS

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 157 total)
  • Author
    Posts
  • in reply to: Date format for OOTB lookup associated field #33950
    MikeS
    Participant

    This works great in the forms. Thanks.
    However, the List view still shows the time stamp (00:00:00).

    MikeS

    in reply to: Remove hyperlink address default text #33831
    MikeS
    Participant

    Works great Alex!
    Thanks,
    MikeS

    in reply to: Remove hyperlink address default text #33800
    MikeS
    Participant

    Alexander,

    How can I modify the above to also pre-fill the Description field in SharePoint with the same text on New form entries?

    Thanks,
    MikeS

    MikeS
    Participant

    Alexander,

    I have a similar requirement as above. I need to preload 5000 Child items in a new list and have each Child auto connect to the corresponding Parent in an existing Parent list (one or more children connect to a single parent). However, the Child to Parent lookup field connection discussed here won’t work for some of the associated fields I need to pull from the Parent into the Child record as these Parent fields are multi-line or choice field formats.

    After this backfill operation is complete Child records will be added in a normal fashion from the Parent form.

    Thanks for your help,
    MikeS

    in reply to: Field validation #33438
    MikeS
    Participant

    I was using a recent version. Upgraded to the very latest. The alerts seem to be working properly now. Thanks!
    MikeS

    in reply to: Field validation #33415
    MikeS
    Participant

    That is working .. sometimes. However I get two alerts all the time, and at other times the New form freezes with the two alerts on screen. This happens regardless of the number of fields I am validating (one or two or three fields) and no other JS in the Custom JS.

    MikeS

    in reply to: Field validation #33410
    MikeS
    Participant

    How could I combine three validation fields in this code? I keep getting errors. For example, validate Project1, Project 2, and Project3 field. If any of the fields were missing the alert would call out that field. If two were missing there would be two alerts.

    function dffs_PreSaveAction() {
        if (String(spjs.dffs.beforeProperties.LookupProject) === String(getFieldValue("LookupProject"))) {
            spjs.dffs.alert({
                "title": "",
                "msg": "Please select a value in the field " + spjs.dffs.fieldData.LookupProject.disp + " before trying to save this item."
            });
            return false;
        }
        return true;
    }

    Thanks
    MikeS

    • This reply was modified 7 months ago by MikeS.
    in reply to: filterCAML converted to filterREST #33406
    MikeS
    Participant

    Works great. Thanks!

    MikeS

    in reply to: Field validation #33404
    MikeS
    Participant

    The first snippet above works when there is only one dffs_PreSaveAction in the Custom JS for the New form. However it pops up TWO alerts for some reason.

    If there are two or more PreSaveAction functions it only executes the last one. I need to validate three fields, plus I already have a dffs_PreSaveAction used to write a pulled forward field to a text field when saving. Is there any way to consolidate or rename these so I don’t have conflicts?

    Thanks
    MikeS

    in reply to: Remove hyperlink address default text #33315
    MikeS
    Participant

    Works great!

    Thanks,
    MikeS

    in reply to: Auto Complete only if targeted fields are empty #33306
    MikeS
    Participant

    I will set up two demo lists and see if I can replicate the problem with new lists and go from there.

    MikeS

    in reply to: Auto Complete only if targeted fields are empty #33296
    MikeS
    Participant

    Nope, I’ve run the AC code above as the only Custom JS code and have placed it after other Custom JS with same results. The Template Type fields always overwrite the AC list fields whether the AC list fields are populated or not.

    MikeS

    in reply to: Auto Complete only if targeted fields are empty #33291
    MikeS
    Participant

    This file is loaded before executing the Autocomplete Custom JS

    _scripts/PullInformationFromConnectedList.js

    Complete AC code:

    spjs.ac.textField({
     "applyTo": "TemplateType",
     "helpText": "",
     "loadText": "",
     "listGuid": "{redacted}",
     "listBaseUrl": "redacted",
     "showField": "Title",
     "searchFields": ["Title"],
     "filterCAML": "",
     "useREST": false,
     "preloadData":false,
     "filterREST": "",
     "optionDetailFields": [],
     "optionDetailPrefix": [],
     "enforceUniqueValues": false,
     "rowLimit": 30,
     "listOptionsOnFocus": true,
     "minLengthBeforeSearch": 1,
     "reValidateOnLoad": false,
     "allowAddNew": false,
     "isLookupInSelf": false,
     "addNewAdditionalFields": [],
     "multiselect": false,
     "multiselectSeparator": "; ",
     "orderBy": [
        {
     "fin":"Title",
     "ascending":true
    }
         ],
     "clearSetFieldsOnInvalidSelection": true,
     
     // the setFields section of your AC function call:
     "setFields": [
         {
    			"fromFIN":"Fin1",
    			"joinBy": "",
    			"toFIN":"Fin1",
    		    "parseFunction": "customParseFn",
                "skipIfEmpty": false
    		},
    		{
    			"fromFIN":"Fin2",
    			"joinBy": "",
    			"toFIN":"Fin2",
    			"parseFunction": "customParseFn",
                "skipIfEmpty": false
    		},
    	    {
    			"fromFIN":"Fin3",
    			"joinBy": "",
    			"toFIN":"Fin3",
    			"parseFunction": "customParseFn",
                "skipIfEmpty": false
    		},
    		{
    			"fromFIN":"Fin4",
    			"joinBy": "",
    			"toFIN":"Fin4",
    			"parseFunction": "customParseFn",
                "skipIfEmpty": false
    		},
    		     {
    			"fromFIN":"Fin5",
    			"joinBy": "",
    			"toFIN":"Fin5",
    		    "parseFunction": "customParseFn",
                "skipIfEmpty": false
    		},
    		{
    			"fromFIN":"Fin6",
    			"joinBy": "",
    			"toFIN":"Fin6",
    			"parseFunction": "customParseFn",
                "skipIfEmpty": false
    		},
    	    {
    			"fromFIN":"Fin7",
    			"joinBy": "",
    			"toFIN":"Fin7",
    			"parseFunction": "customParseFn",
                "skipIfEmpty": false
    		},
    		{
    			"fromFIN":"Fin8",
    			"joinBy": "",
    			"toFIN":"Fin8",
    			"parseFunction": "customParseFn",
                "skipIfEmpty": false
    		},
    				{
    			"fromFIN":"Fin9",
    			"joinBy": "",
    			"toFIN":"Fin9",
    			"parseFunction": "customParseFn",
                "skipIfEmpty": false
    		},
    	    {
    			"fromFIN":"Fin10",
    			"joinBy": "",
    			"toFIN":"Fin10",
    			"parseFunction": "customParseFn",
                "skipIfEmpty": false
    		},
    		{
    			"fromFIN":"Fin11",
    			"joinBy": "",
    			"toFIN":"Fin11",
    			"parseFunction": "customParseFn",
                "skipIfEmpty": false
    		},
    	],
     "debug": false
    }); 
    • This reply was modified 7 months, 2 weeks ago by MikeS.
    in reply to: Auto Complete only if targeted fields are empty #33285
    MikeS
    Participant

    The ParseFn function is defined as follows in my CustomJS prior to AC statements:

    function customParseFn(val, fin){
        var currVal = getFieldValue(fin);
        var rVal = val;
         if (currVal.length > 0) {
            rVal = currVal;
           debugger;
        }
        return rVal;
    }

    AC code and sample of SetFields:

    spjs.ac.textField({
     "applyTo": "TemplateType",
     "helpText": "",
     "loadText": "",
     "listGuid": "{redacted}",
     "listBaseUrl": "redacted",
     "showField": "Title",
     "searchFields": ["Title"],
     "filterCAML": "",
     "useREST": false,
     "preloadData":false,
     "filterREST": "",
     "optionDetailFields": [],
     "optionDetailPrefix": [],
     "enforceUniqueValues": false,
     "rowLimit": 30,
     "listOptionsOnFocus": true,
     "minLengthBeforeSearch": 1,
     "reValidateOnLoad": false,
     "allowAddNew": false,
     "isLookupInSelf": false,
     "addNewAdditionalFields": [],
     "multiselect": false,
     "multiselectSeparator": "; ",
     "orderBy": [
        {
     "fin":"Title",
     "ascending":true
    }
         ],
     "clearSetFieldsOnInvalidSelection": true,
    // the setFields section of your AC function call:
     "setFields": [
         {
    			"fromFIN":"Description",
    			"joinBy": "",
    			"toFIN":"Description",
    		    "parseFunction": "customParseFn",
                "skipIfEmpty": false
    		},

    Still not working. Running latest DFFS package.

    MikeS

    • This reply was modified 7 months, 2 weeks ago by MikeS.
    in reply to: Auto Complete only if targeted fields are empty #33281
    MikeS
    Participant

    Custom JS gives me a yellow ! triangle: “Forgotten ‘debugger’ Statement?” Nothing happens when Edit form opened (developer console is not opened).

    MikeS

Viewing 15 posts - 1 through 15 (of 157 total)