UI Builder - Lookup a single record Data Resource

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11 hours ago
Hi,
I am encountering an issue with the 'Lookup a single record' data resource.
I am using a data binding for the 'Record' parameter from a client state parameter.
Issue I am seeing is that if that client state parameter is empty, a refresh on the data resource just returns the first record it finds in the specified table.
This is leading to inconsistent behaviour. Does anyone know how (or if it is possible) to configure this component such that it does not return a row if the 'Record' parameter is not specified or null?
Thanks,
Rich
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
Hi there @Richard Hine
if the record parameter is empty, it defaults to the first record. A common workaround is to add a condition in your data resource (or via a client state param check) so the query only runs when the parameter is populated. Otherwise, it will always return something. Basically, wrap your binding with a guard — no param, no lookup.
Kind Regards,
Mohamed Azarudeen Z
Developer @ KPMG
Microsoft MVP (AI Services), India