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.
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.