Matching text field in subform
Hello all,
I am attempting to trigger a Set Field Value based on values present in a repeating subform populated by a sharepoint lookup matching a certain text value (in this case, a previously populated User Full Name)
Basically, I need (in pseudocode)
if UserFullName == ${subform/checkUserName:[*]}
SetFieldValue of dropdown to 'Review'
I have tried:
(username value outside of subform as well as one inside subform)
When (subform/)UserFullName is equal to subform/checkUserName
When subform/checkUserName is equal to (subform/)UserFullName
The result is either always true or always false, changing the data on the form / field does not change the output for the Set Field Value in the same session (ie, does not change between a false/true)
I have also tried combinations of [this] and [*] and had no success.
-
Belay that request!
I found a solution.... with jquery ( so much for low code )function reqReviewNameToString(){
var names = '';
var SFName = getField('hdnSF_SubmittersRequiringReview'); //this is the prepopulated subform
var SFContentRow= $('.subFormContentRow',SFName);
$.each(SFContentRow, function(i,v){
var fullName = $(v).find("[id^='ReqReviewName']").val(); //this is the field in the subform the names populate into
names += fullName+";"; //make a semicolon-delimited string out of the n-many entries
$("#hdn_ReqReviewNameStr").val(names); //populate a text field with the new string
});
}function getField(ctrl) { //this is just a helper function
debugger;
var test = {};
var options = {};
options.fieldId = ctrl;
eFormHelper.getField(options, function (myResult) { //call helper method
if (myResult.isSuccess) {
test = myResult.data;
} else {
console.log(myResult.error);
}
});
return test;
}/code
I then simply added a "contains" comparison to trigger my rule, hdn_ReqReviewNameStr contains userNameField
サインインしてコメントを残してください。
コメント
1件のコメント