Forum Replies Created
-
AuthorPosts
-
Hi Alexander – thank you so much – fixed it 100%
Best – Doug McCourtHi Alexander –
That was it! changed my test to if (getFieldValue(xxxxx) === “Yes”) and works as expected
Thank-you
Hi Alexander – Thanksso much!
Heres what i ended up with 🙂
function NewChild(ChildType){
var data = {}, newItem, url;
var src=location.href.substring(0,location.href.indexOf(“&”));data.Title = ChildType + “: ” + getFieldValue(“ReqID”);
data.Data_x0020_Req_x0020_ID = getFieldValue(“ID”);
data.ContentTypeId = “0x0100E77C5DF82DE10E428F626F9C954B8E760096E526CBD027D145AA85C81E339A0ABA”;if(getFieldValue(“Req_x0020_Reg_x0020_Requirement”) === true ){
data.PII = true;
}if(getFieldValue(“Req_x0020_Reg_x0020_Requirement”) === true ){
data.Req_x0020_Requirement = true;
}if(getFieldValue(“Req_x0020__x002d__x0020_External”) === true){
data.Ext_x0020_Reporting = true;
}if(ChildType == “DG”){
data.ContentTypeId = “0x01007B6650D869D02E41B966BB31EBC45DB700C33EEB7BB1687946B0DC3B37AE3B0CCD”;
}newItem = spjs.utility.addItem({“listName”:”Request-Supplemental”,”data”:data});
if(newItem.success){
url = “http://sp-……my sharepoint site…./Lists/RequetSupplemental/EditForm.aspx?ID=”+newItem.id+”&”+src;
if(GetUrlKeyValue(“IsDlg”)===”1″){
url += “&IsDlg=1”;
}
location.href = url;
}else{
alert(newItem.errorText);
}
location.href=url;
}November 16, 2016 at 19:24 in reply to: Setting default {currentUser} on People Picker results in invalid entry #14186Thank-you!
That did it perfectly! Thanks so much.
Again – worked perfectly!!
Thank you
Hi Alexander – It works – but I neglected a piece of information, the derivation of the LookupExtraFieldInternalName is based on a multiselect – so there can be multiple different values in the result returned into the lookupValue array. I need to choose the smallest value – so I tried putting in lookupValue.Sort() thinking it would percolate the smallest value up to the top of the list. Instead – I got the dreaded “This took Forever!” – and it didn’t work. (Note – it DOES work properly if there is only one item in the LookupExtraFieldInternalName.) note2: The possible values are: 4 – Exec Oversight; 3 – Management; 2 – Program; or 1 – Workstream / Team.
Absolutely perfect!
-
AuthorPosts