Jeff Lynch

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • in reply to: auto populate based on lookup column #35644
    Jeff Lynch
    Participant

    thank you sir!!!

    in reply to: auto populate based on lookup column #35638
    Jeff Lynch
    Participant

    Thank you for this help!!!! side note, I did not get any of these in email follow up even though I have it checked, I looked in spam, other and focused but nothing came from the dffs. thought you might want to know that.

    in reply to: auto populate based on lookup column #35624
    Jeff Lynch
    Participant

    Let me see if I can clarify, everything seems close but we have some complications.

    Parent List – we are using FullName as the Lookup in the child list – a simple SP Lookup field. In the parent list we also have Salary vs Hourly field – choice field with Hourly and Salary as the choices.

    In the child list they first select the employee from the lookup, then what I want is to auto populate a field in the child form for salary/hourly with the value.

    My first attempt was a cascading lookup on the child salary/hourly field based on the parent, but then when I try and use that value with a rule it doesn’t work because when you debug it is actually returning the ID of the parent item, not the value of salary or hourly.

    so if I can have a value that is set when you select an employee in the child list that I can use for rules to display hide various fields thats what I need. make sense?

    in reply to: calc in set field error #32322
    Jeff Lynch
    Participant

    this code worked!!! Thank you!

    in reply to: calc in set field error #32312
    Jeff Lynch
    Participant

    it’s inserting the commas at the thousand spot, then interprets those as decimals. As a temporary fix I created a calculated field and added them all together.

    As a test I removed the commas in the edit form and when I did that it calculates the sum correctly.

    in reply to: Resource Management #30578
    Jeff Lynch
    Participant

    thank you, that’s what I suspected.

    in reply to: vLookup ID – Word Files #22613
    Jeff Lynch
    Participant

    I would like to be able to add a folder or subfolder and then automatically upload to that folder, or choose a subfolder.
    When i leave the upload to this folder field blank i do not get a choice of folders as the help icon indicates. how can this be achieved?

    in reply to: Require vLookup Values on New form #21888
    Jeff Lynch
    Participant

    only change is on the first two message strings add \n to the end for a new line.

    in reply to: Require vLookup Values on New form #21886
    Jeff Lynch
    Participant

    Final solution – save New Form and continue on to Edit form with dffs special feature, then use this code to build the error message:

    function dffs_PreSaveAction(){
    var hasChildren = false;
    var hasChildren1 = false;
    var hasChildren2 = false;
    var message=””;

    if(spjs.vLookup.dataObj[“vLookupItems”] !== undefined && spjs.vLookup.dataObj[“vLookupItems”][spjs.dffs.data.thisItemID] !== undefined && spjs.vLookup.dataObj[“vLookupItems”][spjs.dffs.data.thisItemID].count > 0){
    hasChildren = true;
    }
    if(spjs.vLookup.dataObj[“vLookupW9”] !== undefined && spjs.vLookup.dataObj[“vLookupW9”][spjs.dffs.data.thisItemID] !== undefined && spjs.vLookup.dataObj[“vLookupW9”][spjs.dffs.data.thisItemID].count > 0){
    hasChildren1 = true;
    }
    if(spjs.vLookup.dataObj[“vLookupContract”] !== undefined && spjs.vLookup.dataObj[“vLookupContract”][spjs.dffs.data.thisItemID] !== undefined && spjs.vLookup.dataObj[“vLookupContract”][spjs.dffs.data.thisItemID].count > 0){
    hasChildren2 = true;
    }
    if(!hasChildren){
    message += “You must add an Item to this request”;

    if(!hasChildren1){
    message += “You must add the W9 to this request”;

    }
    if(!hasChildren2){
    message += “You must add the Contract to this request”;

    }
    if (message != “”){
    alert(message);
    return false;}
    return true;

    }

    in reply to: Require vLookup Values on New form #21884
    Jeff Lynch
    Participant

    On testing the validation does not work on a New Form because it always returns spjs.vLookup.dataObj as undefined in a new form. It works in the edit for so I will have to have the user click create and continue editing on New Form it appears.

    Is there a way to make it work on the new form? I would think it would be difficult.

    in reply to: Require vLookup Values on New form #21882
    Jeff Lynch
    Participant

    this works great. now they want multiple vLookups to be required, I’m thinking add it to the same function so like this…

    function dffs_PreSaveAction(){
    var hasChildren = false;
    var hasChildren1 = false;
    var hasChildren2 = false;

    if(spjs.vLookup.dataObj[“vLookupItems”] !== undefined && spjs.vLookup.dataObj[“vLookupItems”][spjs.dffs.data.thisItemID] !== undefined && spjs.vLookup.dataObj[“vLookupItems”][spjs.dffs.data.thisItemID].count > 0){
    hasChildren = true;
    }
    if(spjs.vLookup.dataObj[“vLookupW9”] !== undefined && spjs.vLookup.dataObj[“vLookupW9”][spjs.dffs.data.thisItemID] !== undefined && spjs.vLookup.dataObj[“vLookupW9”][spjs.dffs.data.thisItemID].count > 0){
    hasChildren1 = true;
    }
    if(spjs.vLookup.dataObj[“vLookupContract”] !== undefined && spjs.vLookup.dataObj[“vLookupContract”][spjs.dffs.data.thisItemID] !== undefined && spjs.vLookup.dataObj[“vLookupContract”][spjs.dffs.data.thisItemID].count > 0){
    hasChildren2 = true;
    }
    if(!hasChildren){
    alert(“You must add an Item to this request”);
    return false;
    }
    if(!hasChildren1){
    alert(“You must add the W9 to this request”);
    return false;
    }
    if(!hasChildren2){
    alert(“You must add the Contract to this request”);
    return false;
    }
    return true;

    }

    question is will it throw all three errors or just the first one with this…I’ll test and see.

    in reply to: Require vLookup Values on New form #21857
    Jeff Lynch
    Participant

    yes i did that, this was just the base code:

    function dffs_PreSaveAction(){
    var hasChildren = false;
    if(spjs.vLookup.dataObj[“vLookupItems”] !== undefined){
    hasChildren = true;
    }
    if(!hasChildren){
    alert(“You must add items before you can save the PRF!”);
    return false;
    }
    return true;
    }

    in reply to: Redirect from NewForm to EditForm in DFFS #19525
    Jeff Lynch
    Participant

    I am having a very hard time getting a lookup field to populate as an additional field.
    I’ve pulled it out in console.log and it is a string and it is populated with getFieldValue but i get a generic error “The operation failed because an unexpected error occured”.

    I pulled the value out and set it as a variable…same result here is my code, any ideas on how to populate a Lookup field?

    function saveAndRedir(){
    var ok = spjs.dffs.check_Mandatory([“Title”]), data = {}, newItem, url;
    var subcat = getFieldValue(“Sub_x0020_Category”);
    if(ok){
    data.Title = (“Title”);
    data.Sub_x0020_Category = subcat;

    newItem = spjs.utility.addItem({“listName”:_spPageContextInfo.pageListId,”data”:data});
    if(newItem.success){
    url = location.pathname.substring(0,location.pathname.lastIndexOf(“/”)) + “/EditForm.aspx?ID=”+newItem.id;
    if(GetUrlKeyValue(“IsDlg”)===”1″){
    url += “&IsDlg=1”;
    }
    location.href = url;
    }else{
    alert(newItem.errorText);
    }
    }
    }

    function PreSaveAction(){
    saveAndRedir();
    return false;
    }

    in reply to: Multiline Textfield Read-only #16638
    Jeff Lynch
    Participant

    I’m trying to implement this and it comes back as “undefined” what might I have missed here. We had issues with the field internal name because it had underscores that were converted to the code, before changing them we got a syntax error due to the field internal name, after changing it to underscores it just comes back as undefined.

    Here is the function:
    function appendHistory(){
    var history = $(“#dffs_Worklog_x0020_History”).find(“td.ms-formbody div.dffs_tdWrap div”).has(“a”).html();
    $(“#dffs_Worklog_x0020_History”).find(“td.dffs-readonly-inner div.dffs_tdWrap”).append(“”+history+””);
    }

    and here is the field internal name the way it appears: Worklog%5Fx0020%5FHistory

    again with the original field internal name we get a syntax error, and with the modified name we get “undefined”

    Jeff Lynch
    Participant

    one issue with the first part, if you open the display form first and then click the edit from there, it does not work, it appears the return path after the ID breaks it, any fix for that?

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