how to trigger the Name change to update in Infopath Form
-
10-12-2019 - |
Question
I need the Name field to be based on many values in the form. I had rules on the Name field itself, and anytime one of the form field changes it set Name to " " and then back to "" in order to 'trigger' Name to use the rules on itself to update. Is this the best approach?
Solution
I just use a rule to set a field value on the submit button prior to submitting the data to Sharepoint. This builds a field that I then use as the fielname in the data connection.
OTHER TIPS
I used a bit of Jquery recently to be triggered on the submit e.g. "uploaddocuments()":
<script language="javascript" type="text/javascript">
var $j = jQuery.noConflict();
function UploadDocuments() {
var a = $j(":input[title='a']").val();
var b = $j(":input[title='b']").val();
var c = $j(":input[title='c']").val();
$j(":input[title='Name']").val(a + ' - ' + b + ' - ' + c );
return true;
}
</script>
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange