Drew Heggie

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • in reply to: Custom JS [Retrive Value from Lookup Table] #8945
    Drew Heggie
    Participant

    Worked perfectly, thanks again.

    in reply to: Custom JS [Retrive Value from Lookup Table] #8928
    Drew Heggie
    Participant

    Hi Alex, Thanks for the code. Just a couple of clarifications:-

    “listName”:”Customers”,
    Does this refer to the List Name of the List I am Looking up?

    “id”:spjs.$(“#dffs_Customer”).find(“option:selected”).val(),
    Do I replace “#dffs_Customer” with the field name the user selects (In my example this would be “Country”, So “#dffs_Counrty”

    in reply to: Custom JS [Retrive Value from Lookup Table] #8851
    Drew Heggie
    Participant

    Hi Alex,
    The user will select a value (in this case a country) from the lookup table and then click on the Calculate button. The onclick button event will run the Function and return the associated score. In the event that the user selects another country within the same session and clicks on the Calculate button again then, ideally, the function would read the new value (Country) and retrieve the associated score.
    The score will then be made available for further calculations.
    Thanks for your support.
    Regards,
    Drew

    in reply to: Custom JS [Retrive Value from Lookup Table] #8783
    Drew Heggie
    Participant

    Hi Alex,
    Excellent, Thanks for this.
    It retrieves the value for the selected country. However, when another country is selected then the previous value (score) is returned. Is there a way to re-read the field selection and then return the value associated?
    Additional information: I’m launching the function from a onclick button event. So the user selects the country and clicks on the button to receive the score.

    As ever, I really appreciate your guidance and support. Thanks again.

    in reply to: Custom JS [Retrive Value from Lookup Table] #8705
    Drew Heggie
    Participant

    Hi Alex,
    Have you had a chance to look at this? Would the solution posted for (this item) be applicable to my requirement?

    Kind regards,
    Drew

    in reply to: Custom JS [ Show Hide Fields ] #8540
    Drew Heggie
    Participant

    Perfect. Thanks again 😎
    While I’m here: Do you have a list of available commands that can be executed via Custom JS? E.g.
    Set field value to…
    Set Field to Read Only
    Alert message…
    Basically the commands available through the Rules Tab.

    Drew Heggie
    Participant

    Correction (Typo)

    spjs.dffs.flag_Mandatory([“Internal_Name_01″]);
    spjs.dffs.flag_Mandatory([“Internal_Name_02″]);
    spjs.dffs.flag_Mandatory([“Internal_Name_03″]);
    spjs.dffs.flag_Mandatory([“Internal_Name_04″]);
    }else{

    in reply to: Where to paste the license for DFFS V3 #7921
    Drew Heggie
    Participant

    Hi Alex,
    I inserted the License code but I still see the prompt saying that I’m using an unlicensed version.
    What’s the correct format for pasting the code in? e.g.

    <script type=”text/javascript”>
    var spjs_dffs_license = “lots of numbers and characters…”;
    </script>

    Drew Heggie
    Participant

    Solved:
    using a combination of a couple of solutions posted by Alex on other issues I came up with the following:-

    $(“Field_01”, “Field_02″,”Field_03″,”Field_04″,”Field_05”).find(“input:checkbox”).bind(“click”,function(){
    customSetRequired();
    });

    function customSetRequired(){

    var a = String(getFieldValue(“Field_01”));
    var b = String(getFieldValue(“Field_02”));
    var c = String(getFieldValue(“Field_03”));
    var d = String(getFieldValue(“Field_04”));
    var e = String(getFieldValue(“Field_05”));

    var aa = a.indexOf(“Derivative”);
    var bb = b.indexOf(“Derivative”);
    var cc = c.indexOf(“Derivative”);
    var dd = d.indexOf(“Derivative”);
    var ee = e.indexOf(“Derivative”);

    if(aa>=0||bb>=0||cc>=0||dd>=0||ee>=0){
    spjs.dffs.flag_Mandatory([“Internal_Name_01”]);
    spjs.dffs.flag_Mandatory([“Internal_Name_02”]);
    spjs.dffs.flag_Mandatory([“Internal_Name_04”]);
    spjs.dffs.flag_Mandatory([“Internal_Name_04”]);
    }else{
    spjs.dffs.clear_Mandatory([“Internal_Name_01”]);
    spjs.dffs.clear_Mandatory([“Internal_Name_02”]);
    spjs.dffs.clear_Mandatory([“Internal_Name_03”]);
    spjs.dffs.clear_Mandatory([“Internal_Name_04”]);
    }
    }

    // On load
    customSetRequired();

    Drew Heggie
    Participant

    Hi,
    I’ve been doing a bit more digging on this and the solution proposed here
    Almost covers my situation. All I need guidance on is changing the Yes/No check box (check) to activate based on the value selected from a choice (in my case the choice would be “Derivatives”).

    Any assistance would be very welcome. Thanks in advance.

    Drew Heggie
    Participant

    Hi,
    Thanks for your reply.
    Yes I’ve been using rules throughout but I need to ensure that when a user goes back and un-checks an enrty that the Required field remains unchanged (at the moment the rules work fine until a user steps back a question – then the rule activates on that question and re-sets the Required fiekd to optional). I just need a function that checks the values of the other question responses to ensure the “Required” state remains if we still have a “Derivatives” selected.

    in reply to: Where to paste the license for DFFS V3 #7847
    Drew Heggie
    Participant

    Hi Alex,
    Thanks for the reply. With the early version of DFFS I’m not using the backend/ frontend configuration. I’m running from a script pasted into the CEWP on the page. Do I just insert it into that?

    Thanks again.

    Drew

    in reply to: Change "Enhanced with DFF" to Something Else #7760
    Drew Heggie
    Participant

    Not a problem. Thanks Alexander.

    Drew Heggie
    Participant

    Thanks Alex,
    Additional information for readers that may be seeing the same behaviour.
    This only seems to affect sites where the Site Features has the option of “Office SharePoint Server Publishing” Activated.

    in reply to: DFFS V3.21 Tabs now appear as Bullets #7591
    Drew Heggie
    Participant

    [SOLVED]
    That was it. For some reason the reference to the css file was pointing to the wrong location.
    Thanks 😎

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