Forum Replies Created
-
AuthorPosts
-
Worked perfectly, thanks again.
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”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,
DrewHi 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.
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,
DrewPerfect. 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.July 19, 2015 at 10:09 in reply to: Programmatically set field to “Required” based on multiple inputs #7957Correction (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{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>July 16, 2015 at 16:17 in reply to: Programmatically set field to “Required” based on multiple inputs #7920Solved:
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();July 15, 2015 at 12:08 in reply to: Programmatically set field to “Required” based on multiple inputs #7907Hi,
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.
July 14, 2015 at 13:01 in reply to: Programmatically set field to “Required” based on multiple inputs #7902Hi,
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.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
Not a problem. Thanks Alexander.
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.[SOLVED]
That was it. For some reason the reference to the css file was pointing to the wrong location.
Thanks 😎 -
AuthorPosts