"My Items" widget Customization

MohitSaxena
Tera Contributor

In the "my items" widget If we go to TASK, It also shows all the "no approval required" tasks also. 

Our requirement Is to filter-out those task whose approval are not required. 

How could we filter-out these? 

 

10 REPLIES 10

pavani_paluri
Tera Guru
Tera Guru

Hi @MohitSaxena ,

 

Please check this script include ActivityConfigurationUtil and Activity Configurations under Employee Center. 

Find the part of the script that pulls the tasks.
Add a condition that says:
Only show tasks where approval is required.

gr.addQuery('approval', '!=', 'not_required');
"Only show tasks where approval is NOT set to 'not required'."

 

Approval Field: The approval field is typically used in sc_task, change_task, and hr_task. Ensure your widget is querying the correct table.
Custom Tasks: If you're using custom task types, verify if they have an approval field or equivalent.
Performance: Avoid overly complex filters in client scripts; use server-side filtering when possible.

 

Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Pavani P

 

-

Thanks for your solution.  @pavani_paluri 

I had added below codes in 

_getPrimaryActivityBasicData function in Script Include -ActivityConfigurationUtilSNC
but still it is not working.MohitSaxena_0-1760290984718.png
 
I also tried by removing the table query, but didn't work.
 
if (gr.isValidField('state')) {
                gr.addQuery('state', '!=', 'not_required');
            }
 

TejasSN_LogicX
Tera Contributor

Hi @MohitSaxena,

please check

 

My request is filtered.

TejasSN_LogicX_0-1760277806949.png

 

Here, edit the filter for the portal page. Here you can edit the filter and also control which data fields can be visible on the portal

TejasSN_LogicX_1-1760277902944.png

 

Hi @TejasSN_LogicX  , Thanks for your reply.

I actually didn't get this solution. Will that make the adjustments in Each users Employee center profile?