The CreatorCon Call for Content is officially open! Get started here.

UI Builder - Lookup a single record Data Resource

Richard Hine
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

5 REPLIES 5

Its_Azar
Tera Guru
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

Sharique Azim
Mega Sage

I was checking in my instance, I too am not finding option to override the default, it would return to the first user no matter what i try. Probably option is to a dummy empty user.


However, since this data resource needs to be consumed somewhere we can enforce a condition there that the client state should not be empty  else ignore further.

Dibyaratnam
Tera Sage

Depending on your usecase, you can use a custom transform data broker, as this OOB composite data broker will refresh every time the client state param changes and its default behaviour of this data broker to return the 1st record.

aneta_koleva
Tera Expert

Hi @Richard Hine , nice to see you again 🙂

I do observe the behavior described by you for the look up a single record data broker.

What I would use in this case is a combination of making the Look up run only when invoked: 

aneta_koleva_0-1758016508334.png

and whenever I need to refresh it I would add a condition that the sysId is available:

aneta_koleva_1-1758016570392.png

I hope this helps you with your requirement.

 

Mark my answer Helpful in case you find it as such.