How to hide/make visible My Survey widget based on conditions?

Baljinder Sing1
Tera Contributor

Is it possible to render My Survey widget based on the conditions:

- visible on SP if Survey is assigned to the user and is active.

 

1 ACCEPTED SOLUTION

Willem
Giga Sage
Giga Sage

Hi,

Change the first line of the "My Surveys"-widget to:

<div ng-if="data.totalRecords != 0 && !(options.showAll && options.showAll != 'false' && data.instances.length && data.totalRecords == data.maxRecords)">

 

View solution in original post

4 REPLIES 4

Manoj Kumar16
Giga Guru

You want to make the change in header option of My Survey or the widget ?? 

In the OOB widget it is already defined in the HTML to show if the number of records are not equal to 0 then show the records-

find_real_file.png

 

If you want to put the condition in the header menu item then  you need to put a condition

find_real_file.png

You can write a function in a script include to check the number of survey records for the current user and use the function in the condition of the menu item

Its OOB My Survey widget with no active survey records,

prefer to hide the widget iso displaying msg 'You have no suveys to take'

 

find_real_file.png

Willem
Giga Sage
Giga Sage

Hi,

Change the first line of the "My Surveys"-widget to:

<div ng-if="data.totalRecords != 0 && !(options.showAll && options.showAll != 'false' && data.instances.length && data.totalRecords == data.maxRecords)">

 

Thanks....that change fixed the issue.