I have this jquery added to my editform.aspx in SharePoint. I want the childcolumn to also have unique values, although it may contain duplicates example below.
Example. When I select mycountry, I want JobDes to show me one instance of Information Technology although I might have multiple instances.
I am a complete newbie to jquery, any help appreciated.
enter code here
<script language="javascript" type="text/javascript">
$(document).ready(function() {
$().SPServices.SPCascadeDropdowns({
relationshipList: "HR",
relationshipListParentColumn: "MyCountry",
relationshipListChildColumn: "JobDes",
parentColumn: "MyCountry",
childColumn: "JobDes"
});
$().SPServices.SPCascadeDropdowns({
relationshipList: "HR",
relationshipListParentColumn: "MyCountry",
relationshipListChildColumn: "Title",
relationshipListSortColumn: "ID",
parentColumn: "JobDes",
childColumn: "PersonnelNumber"
});
$().SPServices.SPCascadeDropdowns({
relationshipList: "BranchNumber",
relationshipListParentColumn: "PersonnelNumber",
relationshipListChildColumn: "Title",
relationshipListSortColumn: "ID",
parentColumn: "PersonnelNumber",
childColumn: "JobNumber"
});
$().SPServices.SPCascadeDropdowns({
relationshipList: "Category",
relationshipListParentColumn: "JobTitle",
relationshipListChildColumn: "Title",
relationshipListSortColumn: "ID",
parentColumn: "JobTitle",
childColumn: "Category"
});
$().SPServices.SPRequireUnique({
columnStaticName: "JobDes",
duplicateAction: 0,
ignoreCase: false,
initMsg: "This value must be unique.",
initMsgCSSClass: "ms-vb",
errMsg: "This value is not unique.",
errMsgCSSClass: "ms-formvalidation",
showDupes: false,
completefunc: null
});
});
</script>