Hi
I want to add two user filters in record the data to those two filters is two columns data from DB when i tried was getting error like below
And the data have duplicate values but need unique values only kindly suggest for this also
a!recordFilterList( name:rule!ATRFA_translateLabel(field:"wbs"), options:a!forEach( items:cons!ATRFA_ENTITY_SETTLE_REQUEST, expression:a!recordFilterListOption( id:fv!item.wbs, name:fv!item.wbs&" ["&fv!item.wbs&"]", filter:a!queryFilter( operator:"=", field:"wbs", value:fv!item.wbs ) ) )
)
Error:
The Requested Record Type Is Not Available The WBS user filter expression for record type ATRFA_Settle_Request failed to evaluate. Details: [Expression evaluation error at function a!forEach [line 3]: Error in a!forEach() expression during iteration 1: Expression evaluation error at function a!recordFilterListOption [line 7]: Invalid index: Cannot index property 'wbs' of type Text into type Data Store Entity]. (APNX-1-4205-021)
Discussion posts and replies are publicly visible
Check the value in cons!ATRFA_ENTITY_SETTLE_REQUEST. It contains Data store entity, and you are trying to index text value from it
I suggest to visit the documentation of how to configure this.
https://docs.appian.com/suite/help/23.1/fnc_system_a_recordfilterlist.html#example
And then
Hi Stefan
Thank you for the response
Tried in similar kind of way like mentioned but it didnt fetched the data
That code in documentation is just an example code for how your recordFilterList() will look like, you need to use recordType! domain to reference any record fields in queryFilter. Check this (this link was also there on the link that Stefan provided ) example and try to apply it to your code.
Thank you for the response Sanchit
yeah i tried with my code only with example provided will go through the documentation thoroughly and will check.
went through document now i am able to fetch the data but after selecting the data to filter was getting below error
Could not parse expression [#"urn:appian:record-field:v1:011945f7-fcd7-40f7-946b-097dba99dbfd/wbs"]. Details: Unexpected count of record variables (APNX-1-4198-001)
Code:
a!localVariables( local!info:a!queryEntity( entity: cons!ATRFA_ENTITY_SETTLE_REQUEST, query: a!query( aggregation: a!queryAggregation( aggregationColumns: { a!queryAggregationColumn( field: "wbs", isGrouping: true ) } ), pagingInfo: a!pagingInfo( startIndex: 1, batchSize: 50 ) ), fetchTotalCount: false ).data.wbs, a!recordFilterList( name: "wbs", options: a!forEach( items: local!info, expression: a!recordFilterListOption( id: fv!item, name: fv!item, filter: a!queryFilter( field: 'recordType!{011945f7-fcd7-40f7-946b-097dba99dbfd}ATRFA_Settle_Request.fields.{wbs}wbs', operator: "=", value: fv!item ) ) ) ) )
Are you sure that you got the field name in the query filter correct? When I copy a record field it looks like this:
'recordType!{cdfcd692-0d4c-42d1-b271-64460f461119}AA Vehicle.fields.{cdd94728-8bd5-47aa-aa56-95e425154a55}vehicleimage'
Yeah same for me, can you attach the snapshot of the code where you are referencing record field? and if you are passing it correctly then what is the type of that field.
yeah sure please find the below snippet the type of that field is varchar
And also the data displaying in filter after selecting fields in drop down was getting error mentioned above
You are using fv!item for id parameter in recordFilterListOption which will pass string value to it and it expects a unique integer value. Can you please change it to fv!index and try then