function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
thanushka_gunasekarathanushka_gunasekara 

Dynamically filtering a query

Hi All,

I’m having an Employee Object which have a Company lookup field and a User Lookup Filed. I want to generate a report dynamically by using the current logged in User’s details and by using the company assigned to the user through the Employee Object.

 

Is it possible to do dynamic filtering and generate a report?

 

Thanks in advance.

 

 

*werewolf**werewolf*

No, not really.  You can add a formula field though that compares the values, like

 

IF( $User.Id = MyUserLookup__c, 1, 0)

 

And then filter where that formula field equals 1.

thanushka_gunasekarathanushka_gunasekara

Hi Thanks for replying. But is there any other straight foreword  way of doing it, other than the way you have mentioned?

*werewolf**werewolf*

No, if there were I would have mentioned it.