<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Hi Appain</title><link>https://community.appian.com/discussions/f/user-interface/29976/hi-appain</link><description>i have a problem when add the new record using the record action , when i want to add the new record the record does not added to data base and the grid please help</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Hi Appain</title><link>https://community.appian.com/thread/119011?ContentTypeID=1</link><pubDate>Tue, 12 Sep 2023 00:34:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:f577b886-5094-4cac-8b58-baeb90dfd848</guid><dc:creator>neelimaj2706</dc:creator><description>&lt;p&gt;Please check if your rule input of this process start form is mapped to process variable in process properties of your process model. If they are mapped correctly, you should be able to insert the values in database using write record in your process model and see your grid with refreshed values.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi Appain</title><link>https://community.appian.com/thread/119010?ContentTypeID=1</link><pubDate>Mon, 11 Sep 2023 23:59:40 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:41b2f4f2-4bdc-4ac3-9463-4165c4ba80e5</guid><dc:creator>Mathieu Drouin</dc:creator><description>&lt;p&gt;I&amp;#39;m assuming the 2nd post is your start form. Hard to say without seeing your process. I would bet on some rule input that isn&amp;#39;t mapped correctly somewhere.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Hi Appain</title><link>https://community.appian.com/thread/119004?ContentTypeID=1</link><pubDate>Mon, 11 Sep 2023 19:46:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:229b56b0-beea-42a6-a564-2dc6f8c4641a</guid><dc:creator>Jimy3751</dc:creator><description>&lt;p&gt;and this is the code for the new record&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;a!localVariables(
  local!branchValue,
  local!customerAccount,
  local!customerid,
  /*define the local variable that i want to put in the drop down*/
  local!branchesName:rule!RDA_GetAllBranchName(),
  local!customerdata: rule!RDA_SearchBranchAccount(),
  /*to get the type of period */
  local!depositperiodtype:rule!RDA_GetPeriodAccountType(),
  local!depositperiodtypeNew,
  local!multibalance,
  local!ledgercode,
  local!inseraccount,
  local!renwalstatus,
  local!newdepositperiod,
  local!DebitValueDate,
 
  /*make the local variable for all the field on the deposit Detalis*/
  local!depositday,
  local!numberofweek,
  local!numberofmonth,
  local!numberofyear,
  /*create the local for the deposit amount*/
  local!depositAmount,
  local!ledger:rule!RDA_ToGetLedger(),
  /*to get the value from the query and put it in drop down*/
  local!multiBalancenew:rule!RDA_ToGetMultiBalance(),
  /*to get the rule for the account type*/
  local!accountType:rule!RDA_ToGetAccountType(),
  local!accountTypeNew,
  /*to get the renwal status*/
  local!renwal:rule!RDA_ToGetRenwalStatus(),
  local!renwalNew,
  /* To get the Balncing Period*/
  local!BalancingPeriod:rule!RDA_ToGetBalancingPeriod(),
  local!BalancingPeriodNew,
  
  /*to get the new deposit period type*/
  local!depositperiodtypeanother:rule!RDA_ToGetNewPeriodType(),
  local!depositperiodtypeanothernew,
  
 
 
  local!fortraicreate:false(),


  
  /*Query to get the customer from the branch and accout*/
  /*if statment to check the query*/ 
  local!customerdatanew:rule!RDA_getCustomerDetailsFromAccountAndBranch(
    branchid:local!branchValue,
    accountnum:  local!customerAccount),
    
  /*call another query to call for the account*/
    
    local!customerAccountDetalis:rule!RDA_toGetAllAccountForCustomer(
    branchid:local!branchValue,
    accountnum:  local!customerAccount),
    
    
  

  
 
  local!showboxinfo:true,
  local!noFiltersApplied: all(fn!isnull, {local!branchValue, local!customerAccount}),
  a!formLayout(
    label: &amp;quot;&amp;quot;,
    contents: {
      a!sectionLayout(
        label: &amp;quot;New Deposit Request&amp;quot;,
        contents: {
          a!columnsLayout(
            columns: {
              a!columnLayout(
                contents: {
                  a!dropdownField(
                    label: &amp;quot;Branches&amp;quot;,
                    labelPosition: &amp;quot;ABOVE&amp;quot;,
                    placeholder: &amp;quot;--- Select a Value ---&amp;quot;,
                    choiceLabels: local!branchesName[&amp;#39;recordType!{c5841245-4826-4ef2-a3d8-a5407a445edb}RDA Branch.fields.{5fa864a0-4174-4956-875e-dbffadf0e323}nameInArabic&amp;#39;],
                    choiceValues: local!branchesName[&amp;#39;recordType!{c5841245-4826-4ef2-a3d8-a5407a445edb}RDA Branch.fields.{bea07028-4c3d-4879-9f5d-7f425aaef187}idBranch&amp;#39;],
                    /*To save the value to value*/
                    value: local!branchValue,
                    saveInto: {
                      local!branchValue,
                      
                      a!save(ri!record[&amp;#39;recordType!{df6fbb1a-9532-49a0-a8bd-61c6440eb962}RDA Deposit.fields.{cca2a98a-8d37-47cf-96ce-32e076077459}idBranch&amp;#39;],local!branchValue),
                      a!save(ri!Branche,local!branchValue)
                    },
                    searchDisplay: &amp;quot;AUTO&amp;quot;,
                    validations: {}
                  )
                }
              ),
              a!columnLayout(
                contents: {
                  a!textField(
                    label: &amp;quot;Customer Account&amp;quot;,
                    labelPosition: &amp;quot;ABOVE&amp;quot;,
                    /*to save the value in the customer account*/
                    value:local!customerAccount,
                    saveInto:{
                      local!customerAccount,
                      a!save(ri!record[&amp;#39;recordType!{df6fbb1a-9532-49a0-a8bd-61c6440eb962}RDA Deposit.fields.{fd8c420d-ca89-4ef3-8269-f871e713b3e4}idAccount&amp;#39;],local!customerAccount),
                      a!save(ri!customer,local!customerAccount)
                      
                      
                      },
                    refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
                    required: true,
                    validations: {
                      if (
                        len(tostring(local!customerAccount))=7,
                        null,
                        &amp;quot;The account number must to be 7 numbers&amp;quot;
                      )
                    }
                  )
                }
              )


            },
            marginAbove: &amp;quot;STANDARD&amp;quot;,
            marginBelow: &amp;quot;STANDARD&amp;quot;,
            stackWhen: {
              &amp;quot;NEVER&amp;quot;
            },
            showDividers: false
          )
        },
        isCollapsible: false,
        isInitiallyCollapsed: false,
        divider: &amp;quot;ABOVE&amp;quot;,
        dividerWeight: &amp;quot;MEDIUM&amp;quot;,
        marginAbove: &amp;quot;NONE&amp;quot;
      ),
      a!boxLayout(
        label: &amp;quot;Customer Info&amp;quot;,
        contents: {
          a!columnsLayout(
            columns: {
              a!columnLayout(
                contents: {
                  a!textField(
                    label: &amp;quot;Name&amp;quot;,
                    labelPosition: &amp;quot;ABOVE&amp;quot;,
                    value: local!customerdatanew[&amp;#39;recordType!{d6de57e4-91fc-44f8-8209-13222b53b9b4}RDA Customer.fields.{e25eb830-c2fd-44fb-9114-4d2ee04f92cb}customerName&amp;#39;],
                    saveInto: {local!customerdatanew[&amp;#39;recordType!{d6de57e4-91fc-44f8-8209-13222b53b9b4}RDA Customer.fields.{e25eb830-c2fd-44fb-9114-4d2ee04f92cb}customerName&amp;#39;]},
                    refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
                    readOnly: true,
                    validations: {}
                  )
                }
              ),
              a!columnLayout(
                contents: {
                  a!textField(
                    label: &amp;quot;Customer Type&amp;quot;,
                    labelPosition: &amp;quot;ABOVE&amp;quot;,
                    value: local!customerdatanew[&amp;#39;recordType!{d6de57e4-91fc-44f8-8209-13222b53b9b4}RDA Customer.fields.{9c3e790e-02c5-4ded-8186-2d6e91ab3421}customerType&amp;#39;],
                    saveInto: {local!customerdatanew[&amp;#39;recordType!{d6de57e4-91fc-44f8-8209-13222b53b9b4}RDA Customer.fields.{9c3e790e-02c5-4ded-8186-2d6e91ab3421}customerType&amp;#39;]},
                    refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
                    readOnly: true,
                    validations: {}
                  )
                }
              ),
              a!columnLayout(
                contents: {
                  a!textField(
                    label: &amp;quot;Customer Class&amp;quot;,
                    labelPosition: &amp;quot;ABOVE&amp;quot;,
                    value: local!customerdatanew[&amp;#39;recordType!{d6de57e4-91fc-44f8-8209-13222b53b9b4}RDA Customer.fields.{43ed8c48-c895-4af8-b85c-69eebfefb9b8}customerClass&amp;#39;],
                    saveInto: {local!customerdatanew[&amp;#39;recordType!{d6de57e4-91fc-44f8-8209-13222b53b9b4}RDA Customer.fields.{43ed8c48-c895-4af8-b85c-69eebfefb9b8}customerClass&amp;#39;]},
                    refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
                    readOnly: true,
                    validations: {}
                  )
                }
              ),
              a!columnLayout(
                contents: {
                  a!textField(
                    label: &amp;quot;National Id&amp;quot;,
                    labelPosition: &amp;quot;ABOVE&amp;quot;,
                    value: local!customerdatanew[&amp;#39;recordType!{d6de57e4-91fc-44f8-8209-13222b53b9b4}RDA Customer.fields.{1d9fd47b-7bcd-4238-8b3f-c015a9ce29d0}nationalId&amp;#39;],
                    saveInto: {local!customerdatanew[&amp;#39;recordType!{d6de57e4-91fc-44f8-8209-13222b53b9b4}RDA Customer.fields.{1d9fd47b-7bcd-4238-8b3f-c015a9ce29d0}nationalId&amp;#39;]},
                    refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
                    readOnly: true,
                    validations: {}
                  )
                }
              ),
              a!columnLayout(
                contents: {
                  a!textField(
                    label: &amp;quot;Address&amp;quot;,
                    labelPosition: &amp;quot;ABOVE&amp;quot;,
                    value: local!customerdatanew[&amp;#39;recordType!{d6de57e4-91fc-44f8-8209-13222b53b9b4}RDA Customer.fields.{13a9f6f9-192f-4cc1-ae4a-68f48607e76c}customerAddress&amp;#39;],
                    saveInto: {local!customerdatanew[&amp;#39;recordType!{d6de57e4-91fc-44f8-8209-13222b53b9b4}RDA Customer.fields.{13a9f6f9-192f-4cc1-ae4a-68f48607e76c}customerAddress&amp;#39;]},
                    refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
                    readOnly: true,
                    validations: {}
                  )
                }
              )
            }
          )
        },
        showWhen: (a!isNotNullOrEmpty(local!customerAccountDetalis)),
        style: &amp;quot;#0000ff&amp;quot;,
        marginBelow: &amp;quot;STANDARD&amp;quot;
        
      ),
      a!localVariables(
        local!selection,
        local!selectedAccount,
        {
          /*this section is for the choose debit account*/
       a!sectionLayout(
            label: &amp;quot;Choose Debit Account&amp;quot;,
            contents: {

              a!gridField(
                label: &amp;quot;&amp;quot;,
                labelPosition: &amp;quot;ABOVE&amp;quot;,
                data: rule!RDA_toGetAllAccountForCustomer(
                  accountnum: local!customerAccount,
                  branchid: local!branchValue
                ),
                columns: {
                  /*Currency Code*/
                  a!gridColumn(
                    label: &amp;quot;Currency Code&amp;quot;,
                    sortField: &amp;quot;currencycode&amp;quot;,
                    value: fv!row[&amp;#39;recordType!{47912efb-2bcc-46aa-8bb4-19ed6593ac5b}RDA Account.relationships.{5482bf40-6062-4e1c-9d2b-b11ad67a998e}rdaCurrency.fields.{0fe8e240-cc22-4a24-bccc-cec96bf11886}desAr&amp;#39;]
                  ),
                  /*Ledger*/
                  a!gridColumn(
                    label: &amp;quot;Ledger&amp;quot;,
                    sortField: &amp;quot;ledger&amp;quot;,
                    value: fv!row[&amp;#39;recordType!{47912efb-2bcc-46aa-8bb4-19ed6593ac5b}RDA Account.relationships.{4f41b3e5-338c-4cc6-9720-a16664f67f1f}rdaLedger.fields.{58cfbfd2-89a5-4a80-9f46-1e72ace876b9}desAr&amp;#39;]
                  ),
                  /*ledger Code*/

                  a!gridColumn(
                    label: &amp;quot;Ledger Code&amp;quot;,
                    sortField: &amp;quot;ledgercode&amp;quot;,
                    value: fv!row[&amp;#39;recordType!{47912efb-2bcc-46aa-8bb4-19ed6593ac5b}RDA Account.fields.{cf750e5c-be43-45fa-b4ca-21d193db4b14}ledgerCode&amp;#39;]
                  ),

                  /*Sub Account*/
                  a!gridColumn(
                    label: &amp;quot;Sub Account&amp;quot;,
                    sortField: &amp;quot;subaccount&amp;quot;,
                    value: fv!row[&amp;#39;recordType!{47912efb-2bcc-46aa-8bb4-19ed6593ac5b}RDA Account.fields.{8877ae39-1845-458f-bb77-f68b9117f843}subAccount&amp;#39;]
                  ),

                  /*Risk Limit*/
                  a!gridColumn(
                    label: &amp;quot;Risk Limit&amp;quot;,
                    sortField: &amp;quot;risklimit&amp;quot;,
                    value: fv!row[&amp;#39;recordType!{47912efb-2bcc-46aa-8bb4-19ed6593ac5b}RDA Account.fields.{161271a2-7e64-4dbe-8458-38217e80106b}riskLimit&amp;#39;]
                  ),

                  /* Available Balance*/
                  a!gridColumn(
                    label: &amp;quot;Available Balance&amp;quot;,
                    sortField: &amp;quot;availablebalance&amp;quot;,
                    value: fv!row[&amp;#39;recordType!{47912efb-2bcc-46aa-8bb4-19ed6593ac5b}RDA Account.fields.{758e56a3-8f73-4f61-bcac-83b70307b98f}avaiableBalance&amp;#39;]
                  ),
                  /*Dollar Equivalent*/
                  a!gridColumn(
                    label: &amp;quot;Dollar Equivalent&amp;quot;,
                    sortField: &amp;quot;dollarequivalent&amp;quot;,
                    value: fv!row[&amp;#39;recordType!{47912efb-2bcc-46aa-8bb4-19ed6593ac5b}RDA Account.fields.{8f921c0b-188f-4502-b5d8-2040ecbbda5b}dollarEquivalent&amp;#39;]
                  ),
                  /*Account Restriction*/
                  a!gridColumn(
                    label: &amp;quot;Account Restriction&amp;quot;,
                    sortField: &amp;quot;accountrestriction&amp;quot;,
                    value: fv!row[&amp;#39;recordType!{47912efb-2bcc-46aa-8bb4-19ed6593ac5b}RDA Account.fields.{8b8b8c85-c7bf-4032-84a2-25fe8a65bccb}amountRestrication&amp;#39;]
                  )

                },
                selectable: true,
                selectionValue: local!selection,
                selectionSaveInto: {
                  local!selection,
                  /* This save adds the full rows of data for items selected in the most recent user interaction to local!selectedEmployees. */
                  a!save(local!selectedAccount, append(local!selectedAccount, fv!selectedRows)),
                  /* This save removes the full rows of data for items deselected in the most recent user interaction to local!selectedEmployees. */
                  a!save(local!selectedAccount, difference(local!selectedAccount, fv!deselectedRows))
                },
                validations: {}
              )


            },
            showWhen:and(
              a!isNotNullOrEmpty(local!customerAccountDetalis),
              or(isnull(local!selectedAccount), length(local!selectedAccount) = 0))


          ),
          /*this section is for the create new deposit*/
      a!sectionLayout(
        label: &amp;quot;&amp;quot;,
        contents: {
          a!sectionLayout(
            label: &amp;quot;Create Deposit&amp;quot;,
            contents: {
              a!columnsLayout(
                columns: {
                  a!columnLayout(
                    contents: {
                      a!textField(
                        label: &amp;quot;Debit Account&amp;quot;,
                        labelPosition: &amp;quot;ABOVE&amp;quot;,
                        /*to get the id for the account*/
                        value: index(local!selectedAccount,1,&amp;quot;null&amp;quot;).idAccount,
                        saveInto: {index(local!selectedAccount,1,&amp;quot;null&amp;quot;).idAccount},
                        refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
                        readOnly: true,
                        validations: {}
                      )
                    }
                  ),
                  a!columnLayout(
                    contents: {}
                  ),
                  a!columnLayout(
                    contents: {}
                  )
                }
              )
            }
          ),
          a!localVariables(
            local!indexArray:index(local!selectedAccount,1,&amp;quot;null&amp;quot;),
          a!boxLayout(
            label: &amp;quot;Deposit Details&amp;quot;,
            contents: {
              a!columnsLayout(
                columns: {
                  a!columnLayout(
                    contents: {
                      a!textField(
                        label: &amp;quot;Deposit Amount&amp;quot;,
                        labelPosition: &amp;quot;ABOVE&amp;quot;,
                        value:local!depositAmount,
                        
                        saveInto: {local!depositAmount,
                        a!save(ri!record[&amp;#39;recordType!{df6fbb1a-9532-49a0-a8bd-61c6440eb962}RDA Deposit.fields.{bd691a2f-841a-4876-9779-78490577481d}depositAmount&amp;#39;],local!depositAmount)},
                        refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
                        required: true,
                        validations: {if (
                          and(a!isNotNullOrEmpty(local!depositAmount),local!depositAmount&amp;lt;=local!indexArray.avaiableBalance),
                          null(),&amp;quot;Deposit Amount can&amp;#39;t be larger than avaiable Balance&amp;quot;)}
                      )
                    }
                  ),
                  /*put the local variable*/
                  a!localVariables(
                    local!currencyname:rule!RDA_toGetCurrenyToGrid(
                      idcurrency: local!indexArray.currencyCode
                    ),
                    a!columnLayout(
                    contents: {
                      a!textField(
                        label: &amp;quot;Currency Code&amp;quot;,
                        labelPosition: &amp;quot;ABOVE&amp;quot;,
                        value: {local!currencyname[&amp;#39;recordType!{5e9af92e-b260-4c13-96d7-220c915dbdf0}RDA Currency.fields.{0fe8e240-cc22-4a24-bccc-cec96bf11886}desAr&amp;#39;]},



                        saveInto: {local!currencyname[&amp;#39;recordType!{5e9af92e-b260-4c13-96d7-220c915dbdf0}RDA Currency.fields.{0fe8e240-cc22-4a24-bccc-cec96bf11886}desAr&amp;#39;],
                        a!save(ri!record[&amp;#39;recordType!{df6fbb1a-9532-49a0-a8bd-61c6440eb962}RDA Deposit.fields.{6da19d7c-f1cb-4608-94e7-d0118b8b131f}currencyCode&amp;#39;],local!currencyname[&amp;#39;recordType!{5e9af92e-b260-4c13-96d7-220c915dbdf0}RDA Currency.fields.{0efd6fec-d5be-4b2c-b3b6-5f98997494a3}idCurrency&amp;#39;])},
                        refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
                        required: true,
                        readOnly: false,
                        disabled: true,
                        validations: {}
                      )
                    }
                  )),
                    
                 
                  
                  a!columnLayout(
                    contents: {
                      a!dropdownField(
                        label: &amp;quot;Ledger Code&amp;quot;,
                        labelPosition: &amp;quot;ABOVE&amp;quot;,
                        placeholder: &amp;quot;--- Select a Value ---&amp;quot;,
                        choiceLabels: local!ledger[&amp;#39;recordType!{5929b5c3-a8c4-484b-8696-e9faf41672c2}RDA Ledger.fields.{58cfbfd2-89a5-4a80-9f46-1e72ace876b9}desAr&amp;#39;],
                        choiceValues: local!ledger[&amp;#39;recordType!{5929b5c3-a8c4-484b-8696-e9faf41672c2}RDA Ledger.fields.{fdfe8b26-5460-411d-8ae4-d424d2b35394}idLedger&amp;#39;],
                        value:  local!ledgercode,
                        saveInto: {local!ledgercode,
                       
                        /*Note i must add the record to deposit field*/
                        /*a!save(ri!record[&amp;#39;recordType!{df6fbb1a-9532-49a0-a8bd-61c6440eb962}RDA Deposit&amp;#39;.],local!ledger[&amp;#39;recordType!{5929b5c3-a8c4-484b-8696-e9faf41672c2}RDA Ledger.fields.{fdfe8b26-5460-411d-8ae4-d424d2b35394}idLedger&amp;#39;]*/
                        },
                        searchDisplay: &amp;quot;AUTO&amp;quot;,
                        required: true,
                        validations: {}
                      )
                    }
                  ),
                  a!columnLayout(
                    contents: {
                      a!dropdownField(
                        label: &amp;quot;Multi Balance&amp;quot;,
                        labelPosition: &amp;quot;ABOVE&amp;quot;,
                        placeholder: &amp;quot;--- Select a Value ---&amp;quot;,
                        choiceLabels:local!multiBalancenew[&amp;#39;recordType!{35a006ad-f483-48bd-80b6-c1b13b2c47ba}RDA MultiBalance.fields.{82fd9ea7-64aa-48de-ba1a-851a614a1225}desAr&amp;#39;],
                        choiceValues:local!multiBalancenew[&amp;#39;recordType!{35a006ad-f483-48bd-80b6-c1b13b2c47ba}RDA MultiBalance.fields.{0d72a1bb-566f-4d09-95da-532bd8fb0508}idMulti&amp;#39;],
                        value:local!multibalance,
                        saveInto: {local!multibalance,
                        a!save(ri!record[&amp;#39;recordType!{df6fbb1a-9532-49a0-a8bd-61c6440eb962}RDA Deposit.fields.{d396a4c7-7424-4f11-ac5d-565aa6d8ddaf}multiBalance&amp;#39;],local!multibalance)},
                        searchDisplay: &amp;quot;AUTO&amp;quot;,
                        required: true,
                        validations: {}
                      )
                    }
                  ),
                  a!columnLayout(
                    contents: {
                      a!dropdownField(
                        label: &amp;quot;Balancing Period&amp;quot;,
                        labelPosition: &amp;quot;ABOVE&amp;quot;,
                        placeholder: &amp;quot;--- Select a Value ---&amp;quot;,
                        choiceLabels: local!BalancingPeriod[&amp;#39;recordType!{938dd1e7-6927-40e5-b533-4e0bc681d0d8}RDA BalancingPeriod.fields.{d5125e1d-123a-40c4-ac71-69aac9b14171}desAr&amp;#39;],
                        choiceValues: local!BalancingPeriod[&amp;#39;recordType!{938dd1e7-6927-40e5-b533-4e0bc681d0d8}RDA BalancingPeriod.fields.{d50a0cd9-e01e-4b71-a73d-ad1080b4fb24}idBalance&amp;#39;],
                        value: local!BalancingPeriodNew,
                        /*saveInto: {local!BalancingPeriodNew,a!save(ri!record[&amp;#39;recordType!{df6fbb1a-9532-49a0-a8bd-61c6440eb962}RDA Deposit&amp;#39;.])},*/
                        searchDisplay: &amp;quot;AUTO&amp;quot;,
                        showWhen: if (and(a!isNotNullOrEmpty(local!multiBalance),local!multibalance=1),true(),false()),
                        required: true,
                        validations: {}
                      )
                    }
                  )
                }
              ),
              a!columnsLayout(
                columns: {
                  a!columnLayout(
                    contents: {
                      a!dropdownField(
                        label: &amp;quot;Interest Acc. Type&amp;quot;,
                        labelPosition: &amp;quot;ABOVE&amp;quot;,
                        placeholder: &amp;quot;--- Select a Value ---&amp;quot;,
                        choiceLabels: local!accountType[&amp;#39;recordType!{3d0d8567-be8e-4c60-b4da-442d4f41a9e5}RDA AccountType.fields.{2a8b50f1-47ad-4fff-b8ee-48490a19d1b3}desAr&amp;#39;],
                        choiceValues:local!accountType[&amp;#39;recordType!{3d0d8567-be8e-4c60-b4da-442d4f41a9e5}RDA AccountType.fields.{2d55516f-64ff-44b0-951c-a1af993429bf}idType&amp;#39;],
                        value:local!accountTypeNew,
                        saveInto: {local!accountTypeNew,
                        a!save(ri!record[&amp;#39;recordType!{df6fbb1a-9532-49a0-a8bd-61c6440eb962}RDA Deposit.fields.{3ad6f1e5-8d62-43dd-bbfc-da1b44d11052}interestAccType&amp;#39;],local!accountTypeNew)},
                        searchDisplay: &amp;quot;AUTO&amp;quot;,
                        required: true,
                        validations: {}
                      )
                    }
                  ),
                  a!columnLayout(
                    contents: {
                      a!dateField(
                        label: &amp;quot;Debit Value Date&amp;quot;,
                        labelPosition: &amp;quot;ABOVE&amp;quot;,
                        value: local!DebitValueDate,
                        saveInto: {local!DebitValueDate
                       },
                        required: true,
                        validations: {}
                      )
                    }
                  ),
                  a!columnLayout(
                    contents: {
                      a!dateField(
                        label: &amp;quot;Credit Value Date&amp;quot;,
                        labelPosition: &amp;quot;ABOVE&amp;quot;,
                        saveInto: {},
                        validations: {}
                      )
                    }
                  ),
                  a!columnLayout(
                    contents: {
                      a!textField(
                        label: &amp;quot;Interest Rate&amp;quot;,
                        labelPosition: &amp;quot;ABOVE&amp;quot;,
                        value:ri!record[&amp;#39;recordType!{df6fbb1a-9532-49a0-a8bd-61c6440eb962}RDA Deposit.fields.{e59bb56b-a1c8-4ba0-8aeb-1b482036308a}interestRate&amp;#39;],
                        saveInto: {ri!record[&amp;#39;recordType!{df6fbb1a-9532-49a0-a8bd-61c6440eb962}RDA Deposit.fields.{e59bb56b-a1c8-4ba0-8aeb-1b482036308a}interestRate&amp;#39;]},
                        refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
                        required: true,
                        disabled: false,
                        masked: true,
                        validations: {}
                      )
                    }
                  ),
                  a!columnLayout(
                    contents: {
                      a!dropdownField(
                        label: &amp;quot;Renewal States&amp;quot;,
                        labelPosition: &amp;quot;ABOVE&amp;quot;,
                        placeholder: &amp;quot;--- Select a Value ---&amp;quot;,
                        choiceLabels:local!renwal[&amp;#39;recordType!{c0d08a29-b611-4b18-ac15-87ab629405b1}RDA RenwalStatus.fields.{b56ad68c-ba47-4501-813e-ac7f71fb58b2}desAr&amp;#39;],
                        choiceValues:local!renwal[&amp;#39;recordType!{c0d08a29-b611-4b18-ac15-87ab629405b1}RDA RenwalStatus.fields.{d721a2a7-64b8-4272-89e7-a9b3bd2acaca}idRenwal&amp;#39;],
                        value:local!renwalNew,
                        saveInto: {local!renwalNew,
                        a!save(ri!record[&amp;#39;recordType!{df6fbb1a-9532-49a0-a8bd-61c6440eb962}RDA Deposit.fields.{a29cc8cf-975c-4177-b8c5-2802cfcf72ae}renewalStates&amp;#39;],local!renwalNew)},
                        searchDisplay: &amp;quot;AUTO&amp;quot;,
                        required: true,
                        validations: {}
                      )
                    }
                  ),
                  a!columnLayout(
                    contents: {
                      a!dateField(
                        label: &amp;quot;Renewal End Date&amp;quot;,
                        labelPosition: &amp;quot;ABOVE&amp;quot;,
                        value: ri!record[&amp;#39;recordType!{df6fbb1a-9532-49a0-a8bd-61c6440eb962}RDA Deposit.fields.{46941675-d8bb-4e8f-9ccd-df20ddd039f3}renewalEndDate&amp;#39;],
                        saveInto: {ri!record[&amp;#39;recordType!{df6fbb1a-9532-49a0-a8bd-61c6440eb962}RDA Deposit.fields.{46941675-d8bb-4e8f-9ccd-df20ddd039f3}renewalEndDate&amp;#39;]},
                        disabled: a!match(
                          value: local!renwalNew,
                          equals: 1,
                          then: {true()},
                          equals:2 ,
                          then: {false()},
                          equals:3,
                          then: {false()},
                          equals: null,
                          then: {false()},
                          default: {false()}
                          
                        ),
                       
                        validations: {}
                      )
                    }
                  )
                }
              ),
              a!columnsLayout(
                columns: {
                  a!columnLayout(
                    contents: {
                      a!dropdownField(
                        label: &amp;quot;Deposit Period Type&amp;quot;,
                        labelPosition: &amp;quot;ABOVE&amp;quot;,
                        placeholder: &amp;quot;--- Select a Value ---&amp;quot;,
                        choiceLabels: local!depositperiodtype[&amp;#39;recordType!{7d2e1940-011b-44e9-a362-e365c9aaa76b}RDA DepositPeriodType.fields.{d507b859-5ec9-4aa8-a710-f40cdccd3217}desAr&amp;#39;],
                        choiceValues: local!depositperiodtype[&amp;#39;recordType!{7d2e1940-011b-44e9-a362-e365c9aaa76b}RDA DepositPeriodType.fields.{b5d1dcf1-6c37-436e-b15a-dd4a56aa117b}idPeriod&amp;#39;],
                        value:local!depositperiodtypeNew,
                        saveInto: {local!depositperiodtypeNew,a!save(ri!record[&amp;#39;recordType!{df6fbb1a-9532-49a0-a8bd-61c6440eb962}RDA Deposit.fields.{4110249f-7152-46d0-af6d-3c30792b7e1c}depositPeriodType&amp;#39;],local!depositperiodtype[&amp;#39;recordType!{7d2e1940-011b-44e9-a362-e365c9aaa76b}RDA DepositPeriodType.fields.{b5d1dcf1-6c37-436e-b15a-dd4a56aa117b}idPeriod&amp;#39;])},
                        searchDisplay: &amp;quot;AUTO&amp;quot;,
                        required: true,
                        validations: {}
                      )
                    }
                  ),
                  a!columnLayout(
                    contents: {
                      a!textField(
                        label: &amp;quot;Deposit Days&amp;quot;,
                        labelPosition: &amp;quot;ABOVE&amp;quot;,
                        value: a!match(
                          value:local!depositperiodtypeNew,
                          equals: 1,
                          then: {local!depositday},
                          /*we must take the local varaible of the weeks and calculate*/
                          equals: 2,
                          then: {if(a!isNotNullOrEmpty(local!numberofweek),local!numberofweek*7,{})},
                          equals: 3,
                          then: {if (a!isNotNullOrEmpty(local!numberofmonth),local!numberofmonth*30,{})},
                          equals: 4,
                          then: {if (a!isNotNullOrEmpty(local!numberofyear),local!numberofyear*356,{})},
                          equals: null,
                          then: {null()},
                          default: {null()}

                        ),
                 
                        saveInto: {local!depositday,
                        a!save(ri!record[&amp;#39;recordType!{df6fbb1a-9532-49a0-a8bd-61c6440eb962}RDA Deposit.fields.{a106702b-1902-4da8-a5ed-03d4a523b557}depositDays&amp;#39;],local!depositday)
                       
                        },
                        refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
                        required: a!match(
                          value:local!depositperiodtypeNew,
                          equals: 1,
                          then: {true()},
                          equals: 2,
                          then: {false()},
                          equals: 3,
                          then: {false()},
                          equals: 4,
                          then: {false()},
                          equals: null,
                          then: {false()},
                          default: {false()}


                        ),
                        readOnly: false,
                        disabled: a!match(
                          value:local!depositperiodtypeNew,
                          equals: 1,
                          then: {false()},
                          equals: 2,
                          then: {true()},
                          equals: 3,
                          then: {true()},
                          equals: 4,
                          then: {true()},
                          equals: null,
                          then: {false()},
                          default: {false()}
                        
                        
                        ),
                        validations: {}
                      )
                    }
                  ),
                  a!columnLayout(
                    contents: {
                      a!textField(
                        label: &amp;quot;Number of Weeks&amp;quot;,
                        labelPosition: &amp;quot;ABOVE&amp;quot;,
                        value:a!match(
                          value:local!depositperiodtypeNew,
                          equals: 1,
                          then: {if (a!isNotNullOrEmpty(local!depositday),local!depositday/7,{})},
                          /*we must take the local varaible of the weeks and calculate*/
                          equals: 2,
                          then: {local!numberofweek},
                          equals: 3,
                          then: {if(a!isNotNullOrEmpty(local!numberofmonth),local!numberofmonth/4,{})},
                          equals: 4,
                          then: {if(a!isNotNullOrEmpty(local!numberofyear),local!numberofyear/52,{})},
                          equals: null,
                          then: {null()},
                          default: {null()}

                        ),            /*there is an error if not handel that */ 
                        saveInto: {local!numberofweek,
                        a!save(ri!record[&amp;#39;recordType!{df6fbb1a-9532-49a0-a8bd-61c6440eb962}RDA Deposit.fields.{443f765e-2883-47ec-8277-415b799fb8d4}numberOfWeeks&amp;#39;],local!numberofweek)},
                        refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
                        
                        required:  a!match(
                          value:local!depositperiodtypeNew,
                          equals: 1,
                          then: {false()},
                          equals: 2,
                          then: {true()},
                          equals: 3,
                          then: {false()},
                          equals: 4,
                          then: {false()},
                          equals: null,
                          then: {false()},
                          default: {false()}


                        ),
                        disabled: 
                        /**/
                        a!match(
                          value:local!depositperiodtypeNew,
                          equals: 1,
                          then: {true()},
                          equals: 2,
                          then: {false()},
                          equals: 3,
                          then: {true()},
                          equals: 4,
                          then: {true()},
                          equals: null,
                          then: {false()},
                          default: {false()}
                        ),
                        masked: false,
                        
                        
                        /**/
                        validations: {
                          null
                        }
                      )
                    }
                  ),
                  a!columnLayout(
                    contents: {
                      a!textField(
                        label: &amp;quot;Number of Months&amp;quot;,
                        labelPosition: &amp;quot;ABOVE&amp;quot;,
                        value: /**/
                        a!match(
                          value:local!depositperiodtypeNew,
                          equals: 1,
                          then: {if (a!isNotNullOrEmpty(local!depositday),local!depositday/30,{})},
                          /*we must take the local varaible of the weeks and calculate*/
                          equals: 2,
                          then: {if (a!isNotNullOrEmpty(local!numberofweek),local!numberofweek/4,{})},
                          equals: 3,
                          then: {local!numberofmonth},
                          equals: 4,
                          then: {if(a!isNotNullOrEmpty(local!numberofyear),local!numberofyear*12,{})},
                          equals: null,
                          then: {null()},
                          default: {null()}

                        ),

                        /**/
                        saveInto: {local!numberofmonth,
                        a!save(ri!record[&amp;#39;recordType!{df6fbb1a-9532-49a0-a8bd-61c6440eb962}RDA Deposit.fields.{363cbe3c-508b-4f3d-8835-df5ba4c6d436}numberOfMonths&amp;#39;],local!numberofmonth)},
                        refreshAfter: &amp;quot;UNFOCUS&amp;quot;, 
                        
                        required:  a!match(
                          value:local!depositperiodtypeNew,
                          equals: 1,
                          then: {false()},
                          equals: 2,
                          then: {false()},
                          equals: 3,
                          then: {true()},
                          equals: 4,
                          then: {false()},
                          equals: null,
                          then: {false()},
                          default: {false()}


                        ),
                        /**/
                        disabled: a!match(
                          value:local!depositperiodtypeNew,
                          equals: 1,
                          then: {true()},
                          equals: 2,
                          then: {true()},
                          equals: 3,
                          then: {false()},
                          equals: 4,
                          then: {true()},
                          equals: null,
                          then: {false()},
                          default: {false()}
                          ),
                        
                        
                        /**/
                        
                        
                        
                        
                        validations: {}
                      )
                    }
                  ),
                  a!columnLayout(
                    contents: {
                      a!textField(
                        label: &amp;quot;Number of Years&amp;quot;,
                        labelPosition: &amp;quot;ABOVE&amp;quot;,
                        /*the value is*/
                        value: a!match(
                          value:local!depositperiodtypeNew,
                          equals: 1,
                          then: {if(a!isNotNullOrEmpty(local!depositday),local!depositday/356,{})},
                          /*we must take the local varaible of the weeks and calculate*/
                          equals: 2,
                          then: {if (a!isNotNullOrEmpty(local!numberofweek),local!numberofweek/52,{})},
                          equals: 3,
                          then: {if (a!isNotNullOrEmpty(local!numberofmonth),local!numberofmonth/12,{})},
                          equals: 4,
                          then: {local!numberofyear},
                          equals: null,
                          then: {null()},
                          default: {null()}

                        ),
            
                        saveInto: {local!numberofyear,
                        a!save(ri!record[&amp;#39;recordType!{df6fbb1a-9532-49a0-a8bd-61c6440eb962}RDA Deposit.fields.{7eac283d-3cd3-4611-9edf-87582eecd374}numberOfYears&amp;#39;],local!numberofyear)},
                        refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
                        
                        required:  a!match(
                          value:local!depositperiodtypeNew,
                          equals: 1,
                          then: {false()},
                          equals: 2,
                          then: {false()},
                          equals: 3,
                          then: {false()},
                          equals: 4,
                          then: {true()},
                          equals: null,
                          then: {false()},
                          default: {false()}


                        ),
                        
                        /**/
                        disabled: a!match(
                          value:local!depositperiodtypeNew,
                          equals: 1,
                          then: {true()},
                          equals: 2,
                          then: {true()},
                          equals: 3,
                          then: {true()},
                          equals: 4,
                          then: {false()},
                          equals: null,
                          then: {false()},
                          default: {false()}
                        ),
                        
                        /**/
                        validations: {}
                      )
                    }
                  ),
                  a!columnLayout(
                    contents: {
                      a!dateField(
                        label: &amp;quot;To Date&amp;quot;,
                        labelPosition: &amp;quot;ABOVE&amp;quot;,
                        saveInto: {},
                        validations: {}
                      )
                    }
                  )
                }
              ),
              a!columnsLayout(
                columns: {
                  a!columnLayout(
                    contents: {
                      a!dropdownField(
                        label: &amp;quot;New Deposit Period Type&amp;quot;,
                        labelPosition: &amp;quot;ABOVE&amp;quot;,
                        placeholder: &amp;quot;--- Select a Value ---&amp;quot;,
                        choiceLabels: local!depositperiodtypeanother[&amp;#39;recordType!{9a877083-7599-4e2b-88c7-819dcf14ff35}RDA NewPeriodTypeAccount.fields.{de07381f-b7e4-4a33-a3d3-1fd53b8f4e36}desAr&amp;#39;],
                        choiceValues: local!depositperiodtypeanother[&amp;#39;recordType!{9a877083-7599-4e2b-88c7-819dcf14ff35}RDA NewPeriodTypeAccount.fields.{e7378ab6-b3c5-4594-9c44-d25fac7c4d1e}idNewperiod&amp;#39;],
                        value:local!depositperiodtypeanothernew,
                        saveInto: {local!depositperiodtypeanothernew,
                        a!save(ri!record[&amp;#39;recordType!{df6fbb1a-9532-49a0-a8bd-61c6440eb962}RDA Deposit.fields.{4bafd1e3-373c-443a-8d43-f1b35d47bc70}newDepositPeriodType&amp;#39;],local!depositperiodtypeanothernew)},
                        searchDisplay: &amp;quot;AUTO&amp;quot;,
                        validations: {}
                      )
                    }
                  ),
                  a!columnLayout(
                    contents: {
                      a!textField(
                        label: &amp;quot;New Deposit Days&amp;quot;,
                        labelPosition: &amp;quot;ABOVE&amp;quot;,
                        saveInto: {},
                        refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
                        validations: {}
                      )
                    }
                  ),
                  a!columnLayout(
                    contents: {
                      a!textField(
                        label: &amp;quot;New Number of Weeks&amp;quot;,
                        labelPosition: &amp;quot;ABOVE&amp;quot;,
                        saveInto: {},
                        refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
                        validations: {}
                      )
                    }
                  ),
                  a!columnLayout(
                    contents: {
                      a!textField(
                        label: &amp;quot;New Number of Months&amp;quot;,
                        labelPosition: &amp;quot;ABOVE&amp;quot;,
                        saveInto: {},
                        refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
                        validations: {}
                      )
                    }
                  ),
                  a!columnLayout(
                    contents: {
                      a!textField(
                        label: &amp;quot;New Number of Years&amp;quot;,
                        labelPosition: &amp;quot;ABOVE&amp;quot;,
                        saveInto: {},
                        refreshAfter: &amp;quot;UNFOCUS&amp;quot;,
                        validations: {}
                      )
                    }
                  ),
                  a!columnLayout(
                    contents: {
                      a!dateField(
                        label: &amp;quot;To Date&amp;quot;,
                        labelPosition: &amp;quot;ABOVE&amp;quot;,
                        saveInto: {},
                        validations: {}
                      )
                    }
                  )
                }
              )
            },
            style: &amp;quot;#0000ff&amp;quot;,
            isCollapsible: false,
            marginBelow: &amp;quot;STANDARD&amp;quot;
          )),
          a!localVariables(
            local!dataGridEdit,
            a!boxLayout(
            label: &amp;quot;Document Details&amp;quot;,
            contents: {
              a!localVariables(
                /*  
  * local!employees is provided in this recipe as a way to start with hard-coded
  * data. However, this data is identical to the data created from the entity-backed
  * tutorial. Replace the hard-coded data with a query to the employee data store
  * entity and all of the employee records from the tutorial will appear.
  *
  * To replace this data with your own, replace (ctrl+H or cmd+H) all references to
  * local!employees with your data source, either via rule input or local variable.
  */

                local!originalString: tostring(loggedInUser()), 
                local!dotCharacter: &amp;quot;.&amp;quot;,
                local!spaceCharacter: &amp;quot; &amp;quot;,
                /* sojood barham@experts ps */
                local!addedBy2: substitute(local!originalString, local!dotCharacter, local!spaceCharacter),
                local!dotCharacter2: &amp;quot; barham@experts ps&amp;quot;,
                local!spaceCharacter2: &amp;quot;&amp;quot;,
                local!addedBy: substitute(local!addedBy2, local!dotCharacter2, local!spaceCharacter2),


                local!employees,
                local!document,
                local!classification,
                a!formLayout(
                 
                  contents: {
                    a!gridLayout(
                      totalCount: count(local!employees),
                      headerCells: {
                        a!gridLayoutHeaderCell(label: &amp;quot;Upload Document&amp;quot; ),
                        a!gridLayoutHeaderCell(label: &amp;quot;Name&amp;quot; ),
                        a!gridLayoutHeaderCell(label: &amp;quot;Clasification&amp;quot; ),
                        a!gridLayoutHeaderCell(label: &amp;quot;Updated By&amp;quot; ),
                        a!gridLayoutHeaderCell(label: &amp;quot;Updated On&amp;quot; ),

                        /* For the &amp;quot;Remove&amp;quot; column */
                        a!gridLayoutHeaderCell(label: &amp;quot;&amp;quot; )
                      },
                      /* Only needed when some columns need to be narrow */
                      columnConfigs: {
                        a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight:3 ),
                        a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight:3 ),
                        a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight:3 ),
                        a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight:3 ),
                        a!gridLayoutColumnConfig(width: &amp;quot;DISTRIBUTE&amp;quot;, weight:3 ),

                        a!gridLayoutColumnConfig(width: &amp;quot;ICON&amp;quot;)
                      },
                      /*
        * a!forEach() will take local!employee data and used that data to loop through an
        * expression that creates each row.
        *
        * When modifying the recipe to work with your data, you only need to change:
        * 1.) the number of fields in each row
        * 2.) the types of fields for each column (i.e. a!textField() for text data elements)
        * 3.) the fv!item elements. For example fv!item.firstName would change to fv!item.yourdata
        */
                      rows: a!forEach(
                        items: local!employees,
                        expression: a!gridRowLayout(
                          id: fv!index,
                          contents: {
                            /* For the First Name Column*/
                            a!fileUploadField(
                              label: &amp;quot;File Upload&amp;quot;,
                              labelPosition: &amp;quot;ABOVE&amp;quot;,
                              target: cons!RDA_DOCUMENT,
                              maxSelections: 1,
                              value: local!document,
                              saveInto: {local!document,
                              a!save(ri!record[&amp;#39;recordType!{df6fbb1a-9532-49a0-a8bd-61c6440eb962}RDA Deposit.relationships.{bffc709b-0c45-42a1-a708-dd4abeef7278}rdaAttachment.fields.{cd4332dd-d46d-4fe7-b08a-3b117d5fc038}idAppianAttachment&amp;#39;],local!document)
                              },
                              validations: {}
                            ),
                            /* For the Last Name Column*/
                            a!textField(
                              label: &amp;quot;last name &amp;quot; &amp;amp; fv!index,
                              value:{index(local!document,1,&amp;quot;null&amp;quot;)},
                              saveInto: fv!item.lastName,
                              required:true
                            ),
                            /* For the Department Column*/
                            a!dropdownField(
                              label: &amp;quot;department &amp;quot; &amp;amp; fv!index,
                              placeholder: &amp;quot;-- Select -- &amp;quot;,
                              choiceLabels: { &amp;quot;Corporate&amp;quot;, &amp;quot;Engineering&amp;quot;, &amp;quot;Finance&amp;quot;, &amp;quot;Human Resources&amp;quot;, &amp;quot;Professional Services&amp;quot;, &amp;quot;Sales&amp;quot; },
                              choiceValues: { &amp;quot;Corporate&amp;quot;, &amp;quot;Engineering&amp;quot;, &amp;quot;Finance&amp;quot;, &amp;quot;Human Resources&amp;quot;, &amp;quot;Professional Services&amp;quot;, &amp;quot;Sales&amp;quot; },
                              value: local!classification,
                              saveInto: local!classification,
                              required:true
                            ),
                            /* For the Updated By Column*/
                            a!textField(
                              label: &amp;quot;title &amp;quot; &amp;amp; fv!index,
                              value: local!addedBy,
                              saveInto: fv!item.title,
                              required:true
                            ),
                            /* For the Updated on Column*/
                            a!textField(
                              label: &amp;quot;phone number &amp;quot; &amp;amp; fv!index,
                              placeholder:&amp;quot;555-456-7890&amp;quot;,
                              value: fv!item.phoneNumber,
                              saveInto: fv!item.phoneNumber,
                              validations: if( len(fv!item.phoneNumber) &amp;gt; 12, &amp;quot;Contains more than 12 characters. Please reenter phone number, and include only numbers and dashes&amp;quot;, null )
                            ),

                            /* For the Removal Column*/
                            a!richTextDisplayField(               
                              value: a!richTextIcon(
                                icon: &amp;quot;close&amp;quot;,
                                altText: &amp;quot;delete &amp;quot; &amp;amp; fv!index,
                                caption: &amp;quot;Remove &amp;quot; &amp;amp; fv!item.firstName &amp;amp; &amp;quot; &amp;quot; &amp;amp; fv!item.lastName,
                                link: a!dynamicLink(
                                  value: fv!index,
                                  saveInto: {
                                    a!save(local!employees, remove(local!employees, save!value))
                                  }
                                ),
                                linkStyle: &amp;quot;STANDALONE&amp;quot;,
                                color: &amp;quot;NEGATIVE&amp;quot;
                              )
                            )
                          }
                        )
                      ),
                      addRowlink: a!dynamicLink(
                        label: &amp;quot;Add Document&amp;quot;,
                        /*
           * For your use case, set the value to a blank instance of your CDT using
           * the type constructor, e.g. type!Employee(). Only specify the field
           * if you want to give it a default value e.g. startDate: today()+1.
           */
                        value: {startDate: today() + 1},
                        saveInto: {
                          a!save(local!employees, append(local!employees, save!value))
                        }
                      ),
                      /* This validation prevents existing employee start date from changing to a date in the future*/
                      validations: if(
                        a!forEach(
                          items: local!employees,
                          expression: and( not( isnull( fv!item.id)), todate(fv!item.startDate) &amp;gt; today() )
                        ),
                        &amp;quot;Existing Employees cannot have an effective start date beyond today&amp;quot;,
                        null
                      ),
                      rowHeader: 1
                    )
                  
                  }
                  /*buttons: a!buttonLayout(*/
                    /*primaryButtons: a!buttonWidget(*/
                      /*label: &amp;quot;Submit&amp;quot;,*/
                      /*submit: true*/
                    /*)*/
                  /*)*/
                )
              )

            },
            style: &amp;quot;#0000ff&amp;quot;,
            marginBelow: &amp;quot;STANDARD&amp;quot;
          )
          )
          
        },
        showWhen: or(a!isNotNullOrEmpty(local!selectedAccount))
          
      )

      /* this section is for the selestion grid so i want to do it */
      /* i want tp put the local variable to view between grid then the depoit request */
    
     
      }
      ),
      a!sectionLayout(
        label: &amp;quot;&amp;quot;,
        contents: {
          a!columnsLayout(
            columns: {
              a!columnLayout(
                contents: {
                  a!buttonArrayLayout(
                    buttons: {
                      a!buttonWidget(
                        label: &amp;quot;Cancel&amp;quot;,
                        style: &amp;quot;NORMAL&amp;quot;
                      )
                    },
                    align: &amp;quot;START&amp;quot;
                  )
                }
              ),
              a!columnLayout(
                contents: {}
              ),
              a!columnLayout(
                contents: {
                  a!buttonArrayLayout(
                    buttons: {
                      a!buttonWidget(
                        label:if (ri!isUpdate,&amp;quot;Save&amp;quot;,&amp;quot;Create&amp;quot;),
                        submit: true,
                        style: &amp;quot;PRIMARY&amp;quot;,
                      )
                    },
                    align: &amp;quot;END&amp;quot;
                  )
                }
              )
            }
          )
        }
      )
      
      
      
      

    }
/*for all the form*/
  )
  /*for the local varaible */
)
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>