Dynamic filter on Project Time Category on Time Sheet portal

ANKITA NAMDEO1
Tera Contributor

I have a requirement where the project time category must be dynamically filtered based on the category of the time card. I have used a reference qualifier on the project time category field to have it working on the classic view. How do I make it work on the time sheet portal ?

 

The solution to apply a static filter on the project time category is to update the link function.

ANKITANAMDEO1_0-1760585287248.png

 


Any suggestions on how to make it dynamic ? Instead of a static filter I would like to use "^u_category="+current.category . How to achieve this and how to obtain the category for individual timecards on the link function ?

3 REPLIES 3

kaushal_snow
Giga Sage

@ANKITA NAMDEO1 ,

 

You’ll need to edit the Time Card Grid (tc grid) widget link function so that instead of a static filter you dynamically append something like ^u_category= + row.category (or whatever the field name is coming down in the row), pulling that value from each time card row in client script, because dictionary qualifiers don’t get applied in the portal since the widget calls its own API for lookups, so embedding the dynamic filter in the link function is the way to make it work in the Time Sheet Portal.....

 

If you found my response helpful, please mark it as ‘Accept as Solution’ and ‘Helpful’. This helps other community members find the right answer more easily and supports the community.

 

Thanks and Regards,
Kaushal Kumar Jha - ServiceNow Technical Consultant/Developer

Yes, searching what object stores reference for individual time cards so that we could use something like "row.category". This syntax is returning undefined values. 

 

 

Gaspar Fiks
Tera Expert

Hello @ANKITA NAMDEO1 
Have you ever solved this? I am facing the same issue.. I need dynamic project time categories. 

 

Please let me know if you found the solution.

Thanks!