UI Builder - Lookup a single record Data Resource

Richard Hine
Tera Guru
Tera Guru

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

1 REPLY 1

Its_Azar
Tera Guru

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.

 

 

☑️ If this helped, please mark it as Helpful or Accept Solution so others can find the answer too.




Kind Regards,

Mohamed Azarudeen Z

Developer @ KPMG

 Microsoft MVP (AI Services), India