I have a read only grid interface whose source is record data (API backed record).
Record holds 3 million data which is one time sync .
If I need to implement two custom picker fields for two columns (ex: Year & Name, max selection is 5 ) and grid should reload even with combination filter as well.
Please drop your suggestions to implement this without affecting the performance much.
Discussion posts and replies are publicly visible
A custom picker always only loads the data it needs. So, each one should not be an issue.
How many rows do you plan to show?
10 suggestions for picker field, 50 rows in read only grid. I was not sure on how my suggest function rule should look like. I can't find any recipes either other than queried data passing into suggest function as labels & identifiers.
The suggestions do not matter as the pick only loads data when the user enters something.
https://appian.rocks/2022/12/22/create-new-items-using-a-custom-picker/
I would give it a try, and keep an eye on interface performance.
In case the performance is bad, you can make the user to click an icon first to make the picker appear.
Use aggregation queries in your suggest functions to fetch only distinct values (limited to 10 results) and require minimum 2 characters before searching. Use pagination (50 rows per page) and reset to page 1 when filters change.The key is that all filtering happens at the database level through the API-backed record, so Appian only processes small filtered result sets, not the full dataset.Example suggestion function code for your reference.
/* Suggest Function Rule */ a!localVariables( /* Query for distinct values using aggregation */ local!results: a!queryRecordType( recordType: recordType!YourRecord, fields: { a!aggregationFields( groupings: a!grouping( field: recordType!YourRecord.fields.year, alias: "value" ) ) }, filters: if( len(ri!searchText) > 2, a!queryFilter( field: recordType!YourRecord.fields.year, operator: "starts with", value: ri!searchText ), {} ), pagingInfo: a!pagingInfo(startIndex: 1, batchSize: 10) ), /* MUST return a!dataSubset with data and identifiers */ a!dataSubset( data: index(local!results.data, "value", {}), identifiers: index(local!results.data, "value", {}) ) )
Thanks Stefan Helzle
Thanks Shubham Aware