Paul Woodcock

Forum Replies Created

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • in reply to: Setting a field value for a dropdown #30688
    Paul Woodcock
    Participant

    Hi Alexander,

    I’ve just realised I needed to change the number to string:

    
    
    function dffs_PreSaveDuration(){
        var noBaby = getFieldValue("BabyNumber").split(" ", 1);
        var X40 = Math.floor(noBaby*40).toString();
        console.log(X40);
        setFieldValue("SlotLength", X40);
    }

    So all sorted. Thanks anyway!

    Paul

    Paul Woodcock
    Participant

    Hi Alexander,

    I’ve worked it out, I just needed to rearrange your line of code:

    setFieldValue("EventDate", [date.getDate()+"/"+(date.getMonth() + 1)+"/"+date.getFullYear(), hour, minutes]);

    When I tried this earlier I must of mistyped something.

    Thanks again,

    Paul

    Paul Woodcock
    Participant

    Hi Alexander,

    That worked like a charm. Its just displaying the date in US date format mm/dd/yyyy rather than UK date format.

    I’ve tried adding:

    spjs.dffs.data.lcidToDateFormat["2057"] = "d/m/y";

    before the function but this did not alter the format in the form.

    Paul

    Paul Woodcock
    Participant

    Hi Alexander,

    Thank you for your help. The code works for setting the minutes but there is a problem setting the hour in the StartDate field (see attachment). Its a calendar type SharePoint app.

    The only this I can think of why its failing is because in the hours dropdown show 08:, 09:, 10:, 11: by default. Is the “:” causing an problem?

    If I try to append the “:” to the hour it causes an error as its not a recognised date format.

    Regards

    Paul

    Attachments:
    in reply to: vLookUp in list view error #30290
    Paul Woodcock
    Participant

    Hi Alexander,

    Thanks, I’ve updated now and it has resolved the issue.

    Regards

    Paul

    in reply to: vLookUp in list view error #29992
    Paul Woodcock
    Participant

    Hi Alexander,

    These are the versions:
    /DFFS/js/DFFS_frontend.min.js v4.4.4.24
    /DFFS/js/DFFS_backend.min.js v4.4.4.24
    /DFFS/css/DFFS_frontend.css v4.55
    /DFFS/css/DFFS_backend.css v4.49
    /DFFS/plugins/SPJS-vLookup_frontend.js v2.2.147
    /DFFS/plugins/SPJS-vLookup_backend.js v2.2.147
    /DFFS/plugins/SPJS-ac.js v1.6.47
    /DFFS/plugins/SPJS-casc.js v3.7.35
    /DFFS/plugins/SPJS-lookup.js v1.1.20
    /DFFS/plugins/SPJS-Utility.js v1.344
    /DFFS/installer/DFFS_Installer_v2.html v2.0.0.10

    Regards

    Paul

    in reply to: vLookup and a document template #29784
    Paul Woodcock
    Participant

    Hi Alex,

    Thank you for taking the time to help me. I got it working. I had not appreciated that the ‘template’ must be an item in a document library rather than stored as a template within the content type settings.

    Paul

    in reply to: vLookup and a document template #29745
    Paul Woodcock
    Participant

    Hi Alex,

    – Registrars is the site
    – TrainingExcessDeaths is the document library
    – Forms is part of the file path but I’m not sure what it is
    – RegisterDeath is the content type where the pre-registration-form.docx document template is located.

    I don’t have any folders in the document library.

    I’ve tried just using teams/Registrars/TrainingExcessDeaths as the file path for templateLibRelUrl and targetLibPath. But I still get the same error message.

    From looking at the Microsoft REST documentation I think there is a slight difference between SharePoint 2016/online and Sharepoint 2013. I’m going to try altering the REST api code tomorrow when I’m back in work.

    Paul

    in reply to: vLookup and a document template #29733
    Paul Woodcock
    Participant

    Hi Alex

    My variables are:

    
    
    var vLookupFieldname = "vLookup_Children"; // Name of the vLookup field in this list
        var templateLibRelUrl = _spPageContextInfo.webServerRelativeUrl + "/teams/Registrars/TrainingExcessDeaths/Forms/RegisterDeath"; // Relative URL to the document library where the template is found
        var templateName = "Pre-Registration-form.docx"; // Name of the tempate. It must be docx and not dotx
        var targetLibGUID = "{BD751507-B0AF-4ED3-9315-800384BFD011}"; // GUID of the save target document library. Used when getting and setting metadata to connect to this vLookup
        var targetLibPath = _spPageContextInfo.webServerRelativeUrl + "/teams/Registrars/TrainingExcessDeaths/Forms"; // Relative URL to the document library you want to save to
        var newDocName = "New_death_" + jQuery.now() + ".docx"; // Name of new document
    in reply to: vLookup and a document template #29717
    Paul Woodcock
    Participant

    Hi,

    Its an on premise SharePoint 2013 site. I also occasionally get the attached error. I’ve checked the variables again. I’m fairly certain they are correct but I’ll go back over them.

    Paul

    Attachments:
    in reply to: vLookup and a document template #29709
    Paul Woodcock
    Participant

    Hi Alex,

    I’m getting the following error message:

    Failed to copy:
    {“readyState”:4,”responseText”:”The length of the URL for this request exceeds the configured maxUrlLength
    value.”,”Status”:400,”statusText”:”Bad Request”}

    I’m wondering if the document is not encoded correctly, and this is being pushed into the url?

    Paul

    in reply to: Cascading Dropdown Sort Order #29563
    Paul Woodcock
    Participant

    Hi,
    I have solved by own problem by putting pipes | in the ‘Day’ field!
    Regards

    Paul

Viewing 12 posts - 1 through 12 (of 12 total)