Skip to main content
kavyam0002
May 25, 2022
Question

HTML Table

  • May 25, 2022
  • 1 reply
  • 0 views

Hi, 

i have a use case where we already showing table using HTML, but now the user required two more columns on one condition else show the old table only 

can anyone suggest me


  local!revRowItems: a!forEach(
    items: local!crGlobalRevAppLimit_cdt,
    expression: {
      if(
        fv!isLast,
        "
Total Revolving Not to Exceed
" & fv!item.currencyId_txt & "
 
 
" & rule!CR_FN_setDecimalValues(
          value_dec: fv!item.limitAmount_0,
          decPlace_int: 2
        ) & "
 
 
",
        "
" & rule!CR_APP_FN_LSS_getFormattedLimitAmountBasedOnFilters(
          crRefLimit_cdt: local!crRefLimit_cdt,
          limitName_bool: true(),
          crProductLimitCode_int: fv!item.crProductLimitCode_int
        ) & "
" & fv!item.currencyId_txt & "
 
 
" & rule!CR_APP_FN_LSS_getFormattedLimitAmountBasedOnFilters(
          crRefLimit_cdt: local!crRefLimit_cdt,
          limitAmount_dec: fv!item.limitAmount_0,
          crProductLimitCode_int: fv!item.crProductLimitCode_int
        ) & "
" & fv!item.tenor_dec & "
" & rule!CR_APP_FOL_FN_formatLSSPricingColumn(
          crAppLimit_cdt: fv!item,
          crRefIntRateKey_cdt: ri!crRefIntRateKey_cdt
        ) & "
"
      )
    }
  ),
  local!nonRevRowItems: a!forEach(
    items: local!crGlobalNonRevAppLimit_cdt,
    expression: {
      if(
        fv!isLast,
        "
Total Non-Revolving Not to Exceed
" & fv!item.currencyId_txt & "
 
 
" & rule!CR_FN_setDecimalValues(
          value_dec: fv!item.limitAmount_0,
          decPlace_int: 2
        ) & "
 
 
",
        "
" & rule!CR_APP_FN_LSS_getFormattedLimitAmountBasedOnFilters(
          crRefLimit_cdt: local!crRefLimit_cdt,
          limitName_bool: true(),
          crProductLimitCode_int: fv!item.crProductLimitCode_int
        ) & "
" & fv!item.currencyId_txt & "


" & rule!CR_APP_FN_LSS_getFormattedLimitAmountBasedOnFilters(
          crRefLimit_cdt: local!crRefLimit_cdt,
          limitAmount_dec: fv!item.limitAmount_0,
          crProductLimitCode_int: fv!item.crProductLimitCode_int
        ) & "
" & fv!item.tenor_dec & "
" & rule!CR_APP_FOL_FN_formatLSSPricingColumn(
          crAppLimit_cdt: fv!item,
          crRefIntRateKey_cdt: ri!crRefIntRateKey_cdt
        ) & "
"
      )
    }
  ),
  /*Project Name - HTML Row*/
  local!projectNameRow_txt: "
" & ri!crAppProject_cdt.projectName_txt & " 
 
 
 
 
 
 
 
",
  /*Revolving HTML Row*/
  local!revolvingFacilityRow_txt: joinarray(
    {
      local!revRowItems
    },
    char(
      10
    )
  ),
  /*Non-Revolving HTML Row*/
  local!nonRevolvingFacilityRow_txt: joinarray(
    {
      local!nonRevRowItems
    },
    char(
      10
    )
  ),
  /*Total Project Amount HTML Row*/
  local!totalProjectAmountRow_txt: "
 Total " & ri!crAppProject_cdt.projectName_txt & " Not to Exceed
" & ri!crAppProject_cdt.currencyId_txt & "
 
 
" & rule!CR_FN_setDecimalValues(
    value_dec: ri!crAppProject_cdt.proposedLimit_dec,
    decPlace_int: 2
  ) & "
 
 
",
  /*Single LSS HTML Table*/
  local!facilityTable_t24: "

" & local!projectNameRow_txt & local!revolvingFacilityRow_txt & local!nonRevolvingFacilityRow_txt & local!totalProjectAmountRow_txt & "
Facility Type CCY Approved Limit (in '000) Borrower Name Allocated Limit (in '000) Tenor/Validity (Months) Pricing
", local!facilityTable_t24
 

    1 reply

    peter.lewis
    Employee
    May 25, 2022

    What have you tried so far? I think generally the approaches I'd suggest would be either to:

    • Create a copy of this whole table and add the new columns to the copy. Then create an if statement at the top level that decides whether to show the old table or the new table.
    • Include an if() statement within each row that decides whether or not to show the additional columns or not.

    I also don't know how you're using this, but you could consider if there are other ways to do this that don't involve HTML tables (e.g create an Appian interface that shows this data, which would be a lot easier to configure).