Appian Community and Appian Academy are being upgraded. From July 24–August 3, the Appian Community will be in read-only mode. During this time, the site will be read-only and user registration will be disabled. We apologize for any inconvenience this may cause, but a more secure, stable, and performant Community experience is coming soon!
The new Appian Community launches August 3, followed by Appian Academy on August 7. During the migration, Appian Community Edition, Appian Academy, Documentation, Certifications, Instructor-led Customer Training, Partner Sales Training & Accreditation, and Forum (for Appian Partners and Customers only) will remain available.
Hi Team,
I have a grid Layout which is having couple of fields. But one search field "Classification" is not working as expected. Please find my below code.
Code:
a!gridLayout( label: "Legal Entity Overview", totalCount: local!entitySize, headercells: { a!gridLayoutHeaderCell( label: "Name" ), a!gridLayoutHeaderCell( label: "Tax Identifier" ), a!gridLayoutHeaderCell( label: "LOB" ), a!gridLayoutHeaderCell( label: "Classification" ), a!gridLayoutHeaderCell( label: "Region" ), a!gridLayoutHeaderCell( label: "Country" ), a!gridLayoutHeaderCell( label: "Reporting Type" ), a!gridLayoutHeaderCell( label: "Client Institution ID" ), a!gridLayoutHeaderCell( label: "Milestone" ), a!gridLayoutHeaderCell( label: "Deadline" ), a!gridLayoutHeaderCell( label: "Completion Date" ), a!gridLayoutHeaderCell( label: "Reportable Status" ) }, columnconfigs: { a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ) }, rows: { a!gridRowLayout( id: 1, contents: { a!dropdownField( value: local!filterEntityname, choiceValues: local!uniqueEntityName, choiceLabels: local!uniqueEntityName, placeHolderLabel: "All", saveInto: { local!filterEntityname, a!save( local!startIndex, 1 ) }/*end save into*/ ), a!textField( disabled: true, value: "" ), a!dropdownField( value: local!filterLobs, choiceValues: local!uniqueEntityLobsId, choiceLabels: local!uniqueEntityLobs, placeHolderLabel: "All", saveInto: { local!filterLobs, a!save( local!startIndex, 1 ) }/*end save into*/ ), a!dropdownField( value: local!filterClassification, choiceValues: local!uniqueClassification, choiceLabels: local!uniqueClassification, placeHolderLabel: "All", saveInto: { local!filterClassification, a!save( local!startIndex, 1 ) }/*end save into*/
), /*a!textField(*/ /*disabled: true,*/ /*value: ""*/ /*),*/ a!dropdownField( value: local!filterRegion, choiceValues: local!uniqueRegionId, choiceLabels: local!uniqueRegionName, placeHolderLabel: "All", saveInto: { local!filterRegion, /*a!save(*/ /*local!filterCI,*/ /*null*/ /*),*/ /*a!save(local!filterLobs,null),*/ /*a!save(*/ /*local!filterEntityname,*/ /*null*/ /*),*/ a!save( local!startIndex, 1 ), /*a!save(*/ /*local!filterDeadline,*/ /*null*/ /*),*/ /*a!save(*/ /*local!noReportingFilter,null*/ /*),*/ /*a!save(local!filterStage,null),*/ /*a!save(local!filterCountry, null),*/ /*if(*/ /*rule!APN_isBlank(local!filterRegion),*/ /*a!save(local!regions,rule!CTR_QR_getLegalEntityRegion()),*/ /*a!save(*/ /*local!regions,*/ /*rule!CTR_QE_GetRegionRef(regionId: local!filterRegion)*/ /*)*/ /**/ /**/ /*)*/ }/*end save into*/ ), a!pickerFieldCustom( label: "", maxSelections: 1, suggestFunction: rule!CTR_UTIL_arrayPickerFilter( filter: _, labels: local!uniqueEntityCoutnriesName, identifiers: local!uniqueEntityCoutnriesId ), selectedLabels: a!forEach( items: tointeger( local!filterCountry ), expression: index( local!uniqueEntityCoutnriesName, wherecontains( fv!item, local!uniqueEntityCoutnriesId ) ) ), value: local!filterCountry, saveInto: { local!filterCountry, a!save( local!startIndex, 1 ) } ), /*a!dropdownField(*/ /*value: local!filterCountry,*/ /*choiceValues: local!uniqueEntityCoutnriesId,*/ /*choiceLabels: local!uniqueEntityCoutnriesName,*/ /*placeHolderLabel: "All",*/ /*saveInto: {*/ /*local!filterCountry,*/ /*a!save(*/ /*local!filterCI,*/ /*null*/ /*),*/ /*a!save(local!filterLobs,null),*/ /*a!save(*/ /*local!filterEntityname,*/ /*null*/ /*),*/ /*a!save(*/ /*local!startIndex,*/ /*1*/ /*),*/ /*a!save(*/ /*local!filterRegion,*/ /*if(isnull(save!value),null,*/ /*index(rule!CTR_GetAllRefCountry(*/ /*countryId: save!value*/ /*).data,"region_id",null))*/ /*),*/ /**/ /*a!save(*/ /*local!regions,*/ /*rule!CTR_QE_GetRegionRef(regionId: local!filterRegion)*/ /*)*/ /*}*/ /**/ /*),*/ a!dropdownField( label: "Reporting Type", choiceLabels: local!uniqueReportingTypeName, choiceValues: local!uniqueReportingTypeId, value: local!filterReportingTypeId, saveInto: { local!filterReportingTypeId, /*Filter values has made null on change of Reporting Type*/ /*a!save(local!filterCI,null),*/ /*a!save(local!filterEntityname,null),*/ /*a!save(local!filterRegion,null)*/ }, placeholderLabel: "--- All ---" ), a!pickerFieldCustom( label: "CI", maxSelections: 1, suggestFunction: rule!CTR_UTIL_arrayPickerFilter( filter: _, labels: local!uniqueEntityCis, identifiers: local!uniqueEntityCis ), value: local!filterCI, saveInto: local!filterCI, selectedLabels: a!forEach( items: local!filterCI, expression: index( local!uniqueEntityCis, wherecontains( fv!item, local!uniqueEntityCis ), {} ) ) ), a!dropdownField( value: local!filterStage, choiceValues: local!uniqueEntityCurrentStageId, choiceLabels: local!uniqueEntityCurrentStageName, placeHolderLabel: "All", saveInto: { local!filterStage, a!save( local!startIndex, 1 ) }/*end save into*/ ), a!dropdownField( value: local!filterDeadline, choiceValues: local!uniquetransientDeadline, choiceLabels: local!uniquetransientDeadline, placeHolderLabel: "All", saveInto: { local!filterDeadline, a!save( local!startIndex, 1 ) }/*end save into*/ ), a!textField( disabled: true, value: "" ), a!dropdownField( value: local!noReportingFilter, choiceValues: local!uniqueHasReportableData, choiceLabels: a!forEach( items: local!uniqueHasReportableData, expression: if( fv!item = true, "Reportable", "Not Reportable" ) ), placeHolderLabel: "All", saveInto: { local!noReportingFilter, a!save( local!startIndex, 1 ) }/*end save into*/ ), } ), a!applyComponents( function: rule!CTR_GDRW_legalEntitiySearch( index: _, entities: local!entities ), array: if( or( rule!APN_isEmpty( local!entities ), local!entitySize < 1 ), {}, enumerate( if( ( local!entitySize - local!startIndex ) < local!defaultBatchSize, ( local!entitySize - local!startIndex ) + 1, local!defaultBatchSize ) ) + local!startIndex ) ) } ),
Discussion posts and replies are publicly visible
Your code is hard to read since you didn't use a Code Box to post it and it didn't retain any indentation. Perhaps you could edit your original post and put your code in one of those? In the mean time I'll try to take a peek as-is when I have a free minute.
Also: can you clarify what you were expecting this code to do, versus what it is actually doing? I'm unable to quite tell what your issue might actually be, just based on the details/screenshot you've provided.
a!gridLayout( label: "Legal Entity Overview", totalCount: local!entitySize, headercells: { a!gridLayoutHeaderCell( label: "Name" ), a!gridLayoutHeaderCell( label: "Tax Identifier" ), a!gridLayoutHeaderCell( label: "LOB" ), a!gridLayoutHeaderCell( label: "Classification" ), a!gridLayoutHeaderCell( label: "Region" ), a!gridLayoutHeaderCell( label: "Country" ), a!gridLayoutHeaderCell( label: "Reporting Type" ), a!gridLayoutHeaderCell( label: "Client Institution ID" ), a!gridLayoutHeaderCell( label: "Milestone" ), a!gridLayoutHeaderCell( label: "Deadline" ), a!gridLayoutHeaderCell( label: "Completion Date" ), a!gridLayoutHeaderCell( label: "Reportable Status" ) }, columnconfigs: { a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ) }, rows: { a!gridRowLayout( id: 1, contents: { a!dropdownField( value: local!filterEntityname, choiceValues: local!uniqueEntityName, choiceLabels: local!uniqueEntityName, placeHolderLabel: "All", saveInto: { local!filterEntityname, a!save( local!startIndex, 1 ) }/*end save into*/ ), a!textField( disabled: true, value: "" ), a!dropdownField( value: local!filterLobs, choiceValues: local!uniqueEntityLobsId, choiceLabels: local!uniqueEntityLobs, placeHolderLabel: "All", saveInto: { local!filterLobs, a!save( local!startIndex, 1 ) }/*end save into*/ ), a!dropdownField( value: local!filterClassification, choiceValues: local!uniqueClassification, choiceLabels: local!uniqueClassification, placeHolderLabel: "All", saveInto: { local!filterClassification, a!save( local!startIndex, 1 ) }/*end save into*/ ), a!dropdownField( value: local!filterRegion, choiceValues: local!uniqueRegionId, choiceLabels: local!uniqueRegionName, placeHolderLabel: "All", saveInto: { local!filterRegion, /*a!save(*/ /*local!filterCI,*/ /*null*/ /*),*/ /*a!save(local!filterLobs,null),*/ /*a!save(*/ /*local!filterEntityname,*/ /*null*/ /*),*/ a!save( local!startIndex, 1 ), /*a!save(*/ /*local!filterDeadline,*/ /*null*/ /*),*/ /*a!save(*/ /*local!noReportingFilter,null*/ /*),*/ /*a!save(local!filterStage,null),*/ /*a!save(local!filterCountry, null),*/ /*if(*/ /*rule!APN_isBlank(local!filterRegion),*/ /*a!save(local!regions,rule!CTR_QR_getLegalEntityRegion()),*/ /*a!save(*/ /*local!regions,*/ /*rule!CTR_QE_GetRegionRef(regionId: local!filterRegion)*/ /*)*/ /**/ /**/ /*)*/ }/*end save into*/ ), a!pickerFieldCustom( label: "", maxSelections: 1, suggestFunction: rule!CTR_UTIL_arrayPickerFilter( filter: _, labels: local!uniqueEntityCoutnriesName, identifiers: local!uniqueEntityCoutnriesId ), selectedLabels: a!forEach( items: tointeger( local!filterCountry ), expression: index( local!uniqueEntityCoutnriesName, wherecontains( fv!item, local!uniqueEntityCoutnriesId ) ) ), value: local!filterCountry, saveInto: { local!filterCountry, a!save( local!startIndex, 1 ) } ), /*a!dropdownField(*/ /*value: local!filterCountry,*/ /*choiceValues: local!uniqueEntityCoutnriesId,*/ /*choiceLabels: local!uniqueEntityCoutnriesName,*/ /*placeHolderLabel: "All",*/ /*saveInto: {*/ /*local!filterCountry,*/ /*a!save(*/ /*local!filterCI,*/ /*null*/ /*),*/ /*a!save(local!filterLobs,null),*/ /*a!save(*/ /*local!filterEntityname,*/ /*null*/ /*),*/ /*a!save(*/ /*local!startIndex,*/ /*1*/ /*),*/ /*a!save(*/ /*local!filterRegion,*/ /*if(isnull(save!value),null,*/ /*index(rule!CTR_GetAllRefCountry(*/ /*countryId: save!value*/ /*).data,"region_id",null))*/ /*),*/ /**/ /*a!save(*/ /*local!regions,*/ /*rule!CTR_QE_GetRegionRef(regionId: local!filterRegion)*/ /*)*/ /*}*/ /**/ /*),*/ a!dropdownField( label: "Reporting Type", choiceLabels: local!uniqueReportingTypeName, choiceValues: local!uniqueReportingTypeId, value: local!filterReportingTypeId, saveInto: { local!filterReportingTypeId, /*Filter values has made null on change of Reporting Type*/ /*a!save(local!filterCI,null),*/ /*a!save(local!filterEntityname,null),*/ /*a!save(local!filterRegion,null)*/ }, placeholderLabel: "--- All ---" ), a!pickerFieldCustom( label: "CI", maxSelections: 1, suggestFunction: rule!CTR_UTIL_arrayPickerFilter( filter: _, labels: local!uniqueEntityCis, identifiers: local!uniqueEntityCis ), value: local!filterCI, saveInto: local!filterCI, selectedLabels: a!forEach( items: local!filterCI, expression: index( local!uniqueEntityCis, wherecontains( fv!item, local!uniqueEntityCis ), {} ) ) ), a!dropdownField( value: local!filterStage, choiceValues: local!uniqueEntityCurrentStageId, choiceLabels: local!uniqueEntityCurrentStageName, placeHolderLabel: "All", saveInto: { local!filterStage, a!save( local!startIndex, 1 ) }/*end save into*/ ), a!dropdownField( value: local!filterDeadline, choiceValues: local!uniquetransientDeadline, choiceLabels: local!uniquetransientDeadline, placeHolderLabel: "All", saveInto: { local!filterDeadline, a!save( local!startIndex, 1 ) }/*end save into*/ ), a!textField( disabled: true, value: "" ), a!dropdownField( value: local!noReportingFilter, choiceValues: local!uniqueHasReportableData, choiceLabels: a!forEach( items: local!uniqueHasReportableData, expression: if( fv!item = true, "Reportable", "Not Reportable" ) ), placeHolderLabel: "All", saveInto: { local!noReportingFilter, a!save( local!startIndex, 1 ) }/*end save into*/ ), } ), a!applyComponents( function: rule!CTR_GDRW_legalEntitiySearch( index: _, entities: local!entities ), array: if( or( rule!APN_isEmpty( local!entities ), local!entitySize < 1 ), {}, enumerate( if( ( local!entitySize - local!startIndex ) < local!defaultBatchSize, ( local!entitySize - local!startIndex ) + 1, local!defaultBatchSize ) ) + local!startIndex ) ) } ),
we have kept a dropdown filter on each field. the drop down for Classification field is not working as expected. If you select anything the data remains same without filtering
Thanks - though FYI you should be able to edit your original post and move your code to a code box just to keep the post itself more readable.
I'm still not clear what "filtering" you mean. I see your drodown saves its value into local!filterClassification, but that local variable doesn't appear anywhere else in the code you've posted so I can't tell what it may or may not be expected to do.
Agreed - it's hard to follow the purpose of the interface. Is the first row of the grid meant to allow you to "search" on each row? If so, I think we'd need to see what your other local variables are doing (in particular local!entities) to give you any advice.
a!localVariables( local!defaultBatchSize: 20, local!startIndex: 1, local!regions: rule!CTR_QR_getLegalEntityRegion(), local!lobs: rule!CTR_QR_getAllLobs(), local!stages: rule!CTR_QR_getLegalEntityStages(), local!reportingCycleList: rule!CTR_getReportingCycle( selectColumns: { "reportingCycleId", "reportingYear" }, active: 1 ), local!reportingTypeList: rule!CTR_getReportingType( selectColumns: { "reportingTypeDescription", "reportingTypeId" }, active: true ), local!filterEntityname, local!filterCI, local!filterRegion, local!filterCountry, local!filterLobs, local!filterStage, local!filterReportingYear: rule!CTR_getReportingYearByCurrentDate(), local!filterReportingTypeId, local!filterDeadline, local!noReportingFilter, local!filterClassification, /*Get filtered entity from DB*/ local!entitiesFromDb: a!refreshVariable( value: rule!CTR_getLegalEntityView( selectColumns: { "legal_entity_id", "legal_entity_name", "run_id", "giin", "ci", "region_name", "region_id", "country_id", "country_name", "line_of_business_id", "line_of_business_name", "line_of_business_code", "current_stage_id", "stage_name", "completion_date", "reportingYear", "reportingTypeId", "reportingTypeDescription", "stage_lob_completion_date", "localTaxNumber", "Id", "hasreportabledata", "country_code", "classification" }, stageId: local!filterStage, reportingYear: local!filterReportingYear, regionId: local!filterRegion, lobId: local!filterLobs, countryId: local!filterCountry, reportingTypeId: local!filterReportingTypeId, legalEntityName: local!filterEntityname, ci: local!filterCI, hasreportabledata: local!noReportingFilter, classification: local!filterClassification, pagingInfo: a!pagingInfo( startIndex: 1, batchSize: - 1, sort: { a!sortInfo( field: "line_of_business_id", ascending: true() ), a!sortInfo( field: "region_id", ascending: true() ), a!sortInfo( field: "reportingTypeId", ascending: true() ), a!sortInfo( field: "ci", ascending: true() ) } ) ), refreshOnReferencedVarChange: true(), refreshInterval: 0.5 ), /* Calculate all derived data ,update CDT temporary field transient deadline */ local!entitiesWithCalculatedData: a!forEach( items: local!entitiesFromDb, expression: updatecdt( fv!item, { transientDeadline: if( toboolean( fv!item.hasreportabledata ) = false, "N.A", rule!CTR_UT_getStageDeadlineByRunIdAndCountryId( stageId: fv!item.current_stage_id, countryId: fv!item.country_id, reportingType: fv!item.reportingTypeId, reportingYear: fv!item.reportingYear, runId: fv!item.run_id, leid: if(contains(cons!CTR_LBL_SPECIFIC_CIS,fv!item.ci),fv!item.legal_entity_id,0) ) ), hasreportabledata: rule!APN_replaceNull( fv!item.hasreportabledata, true ) } ) ), /* apply deadline filter if it is applied*/ local!entities: if( rule!APN_isBlank( local!filterDeadline ), local!entitiesWithCalculatedData, index( local!entitiesWithCalculatedData, wherecontains( cast( typeof( today() ), local!filterDeadline ), cast( typeof( { today() } ), local!entitiesWithCalculatedData.transientDeadline ) ) ) ), /*with(*/ local!entitySize: if( rule!APN_isEmpty( local!entities ), 0, rule!APN_arrayLength( local!entities ) ), local!uniqueEntityName: reject( fn!isnull, rule!APN_distinct( index( local!entities, "legal_entity_name", {} ) ) ), local!uniqueEntityId: reject( fn!isnull, rule!APN_distinct( index( local!entities, "legal_entity_id", {} ) ) ), local!uniqueEntityCis: reject( fn!isnull, rule!APN_distinct( index( local!entities, "ci", {} ) ) ), local!uniqueEntityLobs: reject( fn!isnull, rule!APN_distinct( index( local!entities, "line_of_business_name", {} ) ) ), local!uniqueEntityLobsId: reject( fn!isnull, rule!APN_distinct( index( local!entities, "line_of_business_id", {} ) ) ), local!uniqueEntityCoutnriesId: reject( fn!isnull, rule!APN_distinct( index( local!entities, "country_id", {} ) ) ), local!uniqueEntityCoutnriesName: reject( fn!isnull, rule!APN_distinct( index( local!entities, "country_name", {} ) ) ), local!uniqueEntityCurrentStageId: reject( fn!isnull, rule!APN_distinct( index( local!entities, "current_stage_id", {} ) ) ), local!uniqueEntityCurrentStageName: reject( fn!isnull, rule!APN_distinct( index( local!entities, "stage_name", {} ) ) ), local!uniquetransientDeadline: reject( fn!isnull, rule!APN_distinct( index( local!entities, "transientDeadline", {} ) ) ), local!uniqueReportingTypeName: reject( fn!isnull, rule!APN_distinct( index( local!entities, "reportingTypeDescription", {} ) ) ), local!uniqueReportingTypeId: reject( fn!isnull, rule!APN_distinct( index( local!entities, "reportingTypeId", {} ) ) ), local!uniqueRegionName: reject( fn!isnull, rule!APN_distinct( index( local!entities, "region_name", {} ) ) ), local!uniqueRegionId: reject( fn!isnull, rule!APN_distinct( index( local!entities, "region_id", {} ) ) ), local!uniqueHasReportableData: reject( fn!isnull, rule!APN_distinct( index( local!entities, "hasreportabledata", {} ) ) ), local!uniqueClassification: reject( fn!isnull, rule!APN_distinct( index( local!entities, "classification", {} ) ) ), /*local!ClassificationData: rule!CTR_QE_getLeClassificationDetailsByLeId(*/ /*legal_entity_id: index(local!entities,"data","legal_entity_id",{}),*/ /*line_of_business_id:index(local!entities,"data","line_of_business_id",{}),*/ /*),*/ /*local!uniqueClassification: reject(*/ /*fn!isnull,*/ /*rule!APN_distinct(*/ /*index(*/ /*local!ClassificationData,"data",*/ /*"classification",*/ /*{}*/ /*)*/ /*)*/ /*),*/ { rule!CTR_SCT_clientTaxReportingHeader(), a!columnsLayout( columns: { a!columnLayout( contents: { a!dropdownField( label: "Reporting Type", choiceLabels: local!reportingTypeList.reportingTypeDescription, choiceValues: local!reportingTypeList.reportingTypeId, value: local!filterReportingTypeId, saveInto: { local!filterReportingTypeId, /*Filter values has made null on change of Reporting Type*/ a!save( local!filterCI, null ), a!save( local!filterEntityname, null ) }, placeholderLabel: "--- All ---" ) } ), a!columnLayout( contents: { a!dropdownField( label: "Reporting Year", choiceLabels: rule!CTR_removeDuplicate( local!reportingCycleList.reportingYear ), choiceValues: rule!CTR_removeDuplicate( local!reportingCycleList.reportingYear ), value: local!filterReportingYear, saveInto: local!filterReportingYear, placeholderLabel: "--- All ---" ) } ), a!columnLayout() } ), rule!CTR_SCT_legalEntitiesReportCharts( stageId: local!filterStage, regionId: local!filterRegion, lobId: local!filterLobs, countryId: local!filterCountry, reportingYear: local!filterReportingYear, reportingTypeId: local!filterReportingTypeId, legalEntityName: local!filterEntityname, ci: local!filterCI ), a!columnsLayout( columns: { a!columnLayout( contents: { a!richTextDisplayField( value: a!richTextItem( text: "CLEAR FILTER", size: "MEDIUM", style: "STRONG", color: "ACCENT", link: a!dynamicLink( label: "Clear Filter", saveInto: { a!save( local!filterCountry, null ), a!save( local!filterRegion, null ), a!save( local!filterCI, null ), a!save( local!filterEntityname, null ), a!save( local!filterLobs, null ), a!save( local!filterStage, null ), a!save( local!filterDeadline, null ), a!save( local!noReportingFilter, null ), a!save( local!filterReportingTypeId, null ), a!save( local!filterClassification, null ), } ) ) ) } ) } ), a!gridLayout( label: "Legal Entity Overview", totalCount: local!entitySize, headercells: { a!gridLayoutHeaderCell( label: "Name" ), a!gridLayoutHeaderCell( label: "Tax Identifier" ), a!gridLayoutHeaderCell( label: "LOB" ), a!gridLayoutHeaderCell( label: "Classification" ), a!gridLayoutHeaderCell( label: "Region" ), a!gridLayoutHeaderCell( label: "Country" ), a!gridLayoutHeaderCell( label: "Reporting Type" ), a!gridLayoutHeaderCell( label: "Client Institution ID" ), a!gridLayoutHeaderCell( label: "Milestone" ), a!gridLayoutHeaderCell( label: "Deadline" ), a!gridLayoutHeaderCell( label: "Completion Date" ), a!gridLayoutHeaderCell( label: "Reportable Status" ) }, columnconfigs: { a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ), a!gridLayoutColumnConfig( width: "DISTRIBUTE" ) }, rows: { a!gridRowLayout( id: 1, contents: { a!dropdownField( value: local!filterEntityname, choiceValues: local!uniqueEntityName, choiceLabels: local!uniqueEntityName, placeHolderLabel: "All", saveInto: { local!filterEntityname, a!save( local!startIndex, 1 ) }/*end save into*/ ), a!textField( disabled: true, value: "" ), a!dropdownField( value: local!filterLobs, choiceValues: local!uniqueEntityLobsId, choiceLabels: local!uniqueEntityLobs, placeHolderLabel: "All", saveInto: { local!filterLobs, a!save( local!startIndex, 1 ) }/*end save into*/ ), a!dropdownField( value: local!filterClassification, choiceValues: local!uniqueClassification, choiceLabels: local!uniqueClassification, placeHolderLabel: "All", saveInto: { local!filterClassification, a!save( local!startIndex, 1 ) }/*end save into*/ ), a!dropdownField( value: local!filterRegion, choiceValues: local!uniqueRegionId, choiceLabels: local!uniqueRegionName, placeHolderLabel: "All", saveInto: { local!filterRegion, /*a!save(*/ /*local!filterCI,*/ /*null*/ /*),*/ /*a!save(local!filterLobs,null),*/ /*a!save(*/ /*local!filterEntityname,*/ /*null*/ /*),*/ a!save( local!startIndex, 1 ), /*a!save(*/ /*local!filterDeadline,*/ /*null*/ /*),*/ /*a!save(*/ /*local!noReportingFilter,null*/ /*),*/ /*a!save(local!filterStage,null),*/ /*a!save(local!filterCountry, null),*/ /*if(*/ /*rule!APN_isBlank(local!filterRegion),*/ /*a!save(local!regions,rule!CTR_QR_getLegalEntityRegion()),*/ /*a!save(*/ /*local!regions,*/ /*rule!CTR_QE_GetRegionRef(regionId: local!filterRegion)*/ /*)*/ /**/ /**/ /*)*/ }/*end save into*/ ), a!pickerFieldCustom( label: "", maxSelections: 1, suggestFunction: rule!CTR_UTIL_arrayPickerFilter( filter: _, labels: local!uniqueEntityCoutnriesName, identifiers: local!uniqueEntityCoutnriesId ), selectedLabels: a!forEach( items: tointeger( local!filterCountry ), expression: index( local!uniqueEntityCoutnriesName, wherecontains( fv!item, local!uniqueEntityCoutnriesId ) ) ), value: local!filterCountry, saveInto: { local!filterCountry, a!save( local!startIndex, 1 ) } ), /*a!dropdownField(*/ /*value: local!filterCountry,*/ /*choiceValues: local!uniqueEntityCoutnriesId,*/ /*choiceLabels: local!uniqueEntityCoutnriesName,*/ /*placeHolderLabel: "All",*/ /*saveInto: {*/ /*local!filterCountry,*/ /*a!save(*/ /*local!filterCI,*/ /*null*/ /*),*/ /*a!save(local!filterLobs,null),*/ /*a!save(*/ /*local!filterEntityname,*/ /*null*/ /*),*/ /*a!save(*/ /*local!startIndex,*/ /*1*/ /*),*/ /*a!save(*/ /*local!filterRegion,*/ /*if(isnull(save!value),null,*/ /*index(rule!CTR_GetAllRefCountry(*/ /*countryId: save!value*/ /*).data,"region_id",null))*/ /*),*/ /**/ /*a!save(*/ /*local!regions,*/ /*rule!CTR_QE_GetRegionRef(regionId: local!filterRegion)*/ /*)*/ /*}*/ /**/ /*),*/ a!dropdownField( label: "Reporting Type", choiceLabels: local!uniqueReportingTypeName, choiceValues: local!uniqueReportingTypeId, value: local!filterReportingTypeId, saveInto: { local!filterReportingTypeId, /*Filter values has made null on change of Reporting Type*/ /*a!save(local!filterCI,null),*/ /*a!save(local!filterEntityname,null),*/ /*a!save(local!filterRegion,null)*/ }, placeholderLabel: "--- All ---" ), a!pickerFieldCustom( label: "CI", maxSelections: 1, suggestFunction: rule!CTR_UTIL_arrayPickerFilter( filter: _, labels: local!uniqueEntityCis, identifiers: local!uniqueEntityCis ), value: local!filterCI, saveInto: local!filterCI, selectedLabels: a!forEach( items: local!filterCI, expression: index( local!uniqueEntityCis, wherecontains( fv!item, local!uniqueEntityCis ), {} ) ) ), a!dropdownField( value: local!filterStage, choiceValues: local!uniqueEntityCurrentStageId, choiceLabels: local!uniqueEntityCurrentStageName, placeHolderLabel: "All", saveInto: { local!filterStage, a!save( local!startIndex, 1 ) }/*end save into*/ ), a!dropdownField( value: local!filterDeadline, choiceValues: local!uniquetransientDeadline, choiceLabels: local!uniquetransientDeadline, placeHolderLabel: "All", saveInto: { local!filterDeadline, a!save( local!startIndex, 1 ) }/*end save into*/ ), a!textField( disabled: true, value: "" ), a!dropdownField( value: local!noReportingFilter, choiceValues: local!uniqueHasReportableData, choiceLabels: a!forEach( items: local!uniqueHasReportableData, expression: if( fv!item = true, "Reportable", "Not Reportable" ) ), placeHolderLabel: "All", saveInto: { local!noReportingFilter, a!save( local!startIndex, 1 ) }/*end save into*/ ), } ), a!applyComponents( function: rule!CTR_GDRW_legalEntitiySearch( index: _, entities: local!entities ), array: if( or( rule!APN_isEmpty( local!entities ), local!entitySize < 1 ), {}, enumerate( if( ( local!entitySize - local!startIndex ) < local!defaultBatchSize, ( local!entitySize - local!startIndex ) + 1, local!defaultBatchSize ) ) + local!startIndex ) ) } ), a!richTextDisplayField( value: { if( local!entitySize <= local!defaultBatchSize, {}, a!richTextItem_18r1( text: "|<< ", style: "STRONG", link: a!dynamicLink( value: {}, saveInto: { a!save( local!startIndex, 1 ), } ) ) ), if( local!entitySize <= local!defaultBatchSize, {}, a!richTextItem_18r1( text: " < ", style: "STRONG", link: a!dynamicLink( value: {}, saveInto: { a!save( local!startIndex, if( local!startIndex > 1, local!startIndex - local!defaultBatchSize, local!startIndex ) ), } ) ) ), a!richTextItem_18r1( text: if( local!entitySize = 0, 0, local!startIndex ) & " to " & if( local!entitySize <= local!startIndex + local!defaultBatchSize, local!entitySize, local!startIndex - 1 + local!defaultBatchSize ) & " of " & local!entitySize & " Legal Entities" ), if( local!entitySize <= local!defaultBatchSize, {}, a!richTextItem_18r1( text: " > ", style: "STRONG", link: a!dynamicLink( value: {}, saveInto: { a!save( local!startIndex, if( ( local!startIndex + local!defaultBatchSize ) > local!entitySize, local!startIndex, local!startIndex + local!defaultBatchSize ) ), } ) ) ), if( local!entitySize <= local!defaultBatchSize, {}, a!richTextItem_18r1( text: " >>|", style: "STRONG", link: a!dynamicLink( value: {}, saveInto: { a!save( local!startIndex, roundup( local!entitySize / local!defaultBatchSize, 0 ) * local!defaultBatchSize - ( local!defaultBatchSize - 1 ) ), } ) ) ) } ) }/*)*/ )
Kind apologies as the code little bit huge. But i didn't have any choice. So sharing the code with you
My Issue got resolved, Its due to the filter condition from one of the rule, Many thanks for the help