Need script to remove the values from fields

Vinay49
Tera Expert

Hello ,

 

We have a section called "additional user details" on incident form.  In that section we have some fields(field1,field2,field3). when a task is closed for at least 3 months, the data in the additional user details fields is removed/made Anonymized.

 

I am looking for the script to achieve this requirement

1 ACCEPTED SOLUTION

For name, email and contact number add the operator as "is not empty" instead of "Is not".

This may also work but that operator is SN recommended.
Please mark the answer correct/helpful accordingly.

 


Raghav
MVP 2023

View solution in original post

4 REPLIES 4

Samaksh Wani
Giga Sage
Giga Sage

Hello @Vinay49 

 

You have to create a Flow for it, there you use the wait for Condition till 3 month of span for Closed state and in its task, you can configure the data to remove or clear from the field.

 

Plz mark my solution as Accept, If you find it helpful.

 

Regards,

Samaksh

RaghavSh
Kilo Patron

You can achieve this through Scheduled job which can run daily or weekly as per your requirement.

In the script section of scheduled job , you can glide your incident table and your encoded query should contain below:

 

1. field1,2,3 are not empty.

2.status is closed.

3. There is a field "closed" on incident table which shows the closed dat and time. You can use this field to check if the incident was closed 3 months prior to today's date.

 Note: You can build this query on incident table list view.


Please mark the answer correct/helpful accordingly.


Raghav
MVP 2023

Hi Raghav,

 

Thanks for your reply. I have added conditions like below. Is this correct?

 

Vinay49_0-1697004789737.png

 

For name, email and contact number add the operator as "is not empty" instead of "Is not".

This may also work but that operator is SN recommended.
Please mark the answer correct/helpful accordingly.

 


Raghav
MVP 2023