Need help hiding a Workspace button based on reference record and logged-in user

dd31
Tera Contributor


Hi All,

I have created a button on Workspace using the Button component. I want to hide it based on two conditions:

The current record where the button appears has a reference in a specific table

The Assigned to field of current record should match the logged-in user.

Here’s what I did so far:

Created a Data Source (Transform ) to check these conditions.

Called that data broker from the Hide component visibility property of the button.

However, it’s not working as expected — the button isn’t hiding even when the conditions should match.

Could someone help me figure out what I might be doing wrong?

PFB SS for reference:

dd31_0-1755147821253.png

dd31_1-1755147905634.png

 

 

6 REPLIES 6

@dd31 

so what logs say?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Thanks @Ankur Bawiskar ! I figured it out, the issue was that my Data Broker was pulling the assigned_to from another source where the record wasn’t being fetched properly. I removed that property from the Data Broker and used the correct source, and now the button visibility works as expected.