Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Validating Mandatory TextFields in Dynamic Table preSubmit

$
0
0

Hi Everyone,

 

I am trying to develop a script that checks the form to ensure that certain fields have been filled in. I am unable to figure out how to check the fields in a dynamic table. The current script I have only checks the first row of the table. I want the script to check any rows that is added by the user. I am new to scripting and would appreciate some guidance. Below is the script:

 

form1.Section5Subform.SubmitToBudgetsSubform.SubmitToBRPByEmail::preSubmit:form - (JavaScript, client)

 

if (Section3Subform.SourceBudgetEntryTypeDropDown.rawValue == 1) {

  this.resolveNode("Section4Subform.OneSidedSubform.TransferToTable.Row1[*].OpUnitTextfield ").mandatory = "disabled";

  this.resolveNode("Section4Subform.OneSidedSubform.TransferToTable.Row1[*].FundTextfield") .mandatory = "disabled";

  this.resolveNode("Section4Subform.OneSidedSubform.TransferToTable.Row1[*].DeptIDTextfield ").mandatory = "disabled";

  this.resolveNode("Section4Subform.OneSidedSubform.TransferToTable.Row1[*].CBAccountTextfi eld").mandatory = "disabled";

  this.resolveNode("Section4Subform.OneSidedSubform.TransferToTable.Row1[*].DescriptionText field").mandatory = "disabled";

  this.resolveNode("Section4Subform.TwoSidedSubform.TransferToTable.Row1[*].OpUnitTextfield ").mandatory = "error";

  this.resolveNode("Section4Subform.TwoSidedSubform.TransferToTable.Row1[*].FundTextfield") .mandatory = "error";

  this.resolveNode("Section4Subform.TwoSidedSubform.TransferToTable.Row1[*].DeptIDTextfield ").mandatory = "error";

  this.resolveNode("Section4Subform.TwoSidedSubform.TransferToTable.Row1[*].CBAccountTextfi eld").mandatory = "error";

  this.resolveNode("Section4Subform.TwoSidedSubform.TransferToTable.Row1[*].DescriptionText field").mandatory = "error";

  this.resolveNode("Section4Subform.TwoSidedSubform.TransferFromTable.Row1[*].OpUnitTextfie ld").mandatory = "error";

  this.resolveNode("Section4Subform.TwoSidedSubform.TransferFromTable.Row1[*].FundTextfield ").mandatory = "error";

  this.resolveNode("Section4Subform.TwoSidedSubform.TransferFromTable.Row1[*].DeptIDTextfie ld").mandatory = "error";

  this.resolveNode("Section4Subform.TwoSidedSubform.TransferFromTable.Row1[*].CBAccountText field").mandatory = "error";

  this.resolveNode("Section4Subform.TwoSidedSubform.TransferFromTable.Row1[*].DescriptionTe xtfield").mandatory = "error";

} else

if (Section3Subform.SourceBudgetEntryTypeDropDown.rawValue == 2) {

  this.resolveNode("Section4Subform.OneSidedSubform.TransferToTable.Row1[*].OpUnitTextfield ").mandatory = "error";

  this.resolveNode("Section4Subform.OneSidedSubform.TransferToTable.Row1[*].FundTextfield") .mandatory = "error";

  this.resolveNode("Section4Subform.OneSidedSubform.TransferToTable.Row1[*].DeptIDTextfield ").mandatory = "error";

  this.resolveNode("Section4Subform.OneSidedSubform.TransferToTable.Row1[*].CBAccountTextfi eld").mandatory = "error";

  this.resolveNode("Section4Subform.OneSidedSubform.TransferToTable.Row1[*].DescriptionText field").mandatory = "error";

  this.resolveNode("Section4Subform.TwoSidedSubform.TransferToTable.Row1[*].OpUnitTextfield ").mandatory = "disabled";

  this.resolveNode("Section4Subform.TwoSidedSubform.TransferToTable.Row1[*].FundTextfield") .mandatory = "disabled";

  this.resolveNode("Section4Subform.TwoSidedSubform.TransferToTable.Row1[*].DeptIDTextfield ").mandatory = "disabled";

  this.resolveNode("Section4Subform.TwoSidedSubform.TransferToTable.Row1[*].CBAccountTextfi eld").mandatory = "disabled";

  this.resolveNode("Section4Subform.TwoSidedSubform.TransferToTable.Row1[*].DescriptionText field").mandatory = "disabled";

  this.resolveNode("Section4Subform.TwoSidedSubform.TransferFromTable.Row1[*].OpUnitTextfie ld").mandatory = "disabled";

  this.resolveNode("Section4Subform.TwoSidedSubform.TransferFromTable.Row1[*].FundTextfield ").mandatory = "disabled";

  this.resolveNode("Section4Subform.TwoSidedSubform.TransferFromTable.Row1[*].DeptIDTextfie ld").mandatory = "disabled";

  this.resolveNode("Section4Subform.TwoSidedSubform.TransferFromTable.Row1[*].CBAccountText field").mandatory = "disabled";

  this.resolveNode("Section4Subform.TwoSidedSubform.TransferFromTable.Row1[*].DescriptionTe xtfield").mandatory = "disabled";

} else

(Section3Subform.SourceBudgetEntryTypeDropDown.rawValue == 3) {

  this.resolveNode("Section4Subform.OneSidedSubform.TransferToTable.Row1[*].OpUnitTextfield ").mandatory = "disabled";

  this.resolveNode("Section4Subform.OneSidedSubform.TransferToTable.Row1[*].FundTextfield") .mandatory = "disabled";

  this.resolveNode("Section4Subform.OneSidedSubform.TransferToTable.Row1[*].DeptIDTextfield ").mandatory = "disabled";

  this.resolveNode("Section4Subform.OneSidedSubform.TransferToTable.Row1[*].CBAccountTextfi eld").mandatory = "disabled";

  this.resolveNode("Section4Subform.OneSidedSubform.TransferToTable.Row1[*].DescriptionText field").mandatory = "disabled";

  this.resolveNode("Section4Subform.TwoSidedSubform.TransferToTable.Row1[*].OpUnitTextfield ").mandatory = "error";

  this.resolveNode("Section4Subform.TwoSidedSubform.TransferToTable.Row1[*].FundTextfield") .mandatory = "error";

  this.resolveNode("Section4Subform.TwoSidedSubform.TransferToTable.Row1[*].DeptIDTextfield ").mandatory = "error";

  this.resolveNode("Section4Subform.TwoSidedSubform.TransferToTable.Row1[*].CBAccountTextfi eld").mandatory = "error";

  this.resolveNode("Section4Subform.TwoSidedSubform.TransferToTable.Row1[*].DescriptionText field").mandatory = "error";

  this.resolveNode("Section4Subform.TwoSidedSubform.TransferFromTable.Row1[*].OpUnitTextfie ld").mandatory = "error";

  this.resolveNode("Section4Subform.TwoSidedSubform.TransferFromTable.Row1[*].FundTextfield ").mandatory = "error";

  this.resolveNode("Section4Subform.TwoSidedSubform.TransferFromTable.Row1[*].DeptIDTextfie ld").mandatory = "error";

  this.resolveNode("Section4Subform.TwoSidedSubform.TransferFromTable.Row1[*].CBAccountText field").mandatory = "error";

  this.resolveNode("Section4Subform.TwoSidedSubform.TransferFromTable.Row1[*].DescriptionTe xtfield").mandatory = "error";

}

 

Message was edited by: Dennis Ngu


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>