I am creating a new scheduled task and form. We would like to have the ability to schedule the reassignment of a staff member to a different location in the future. We are a school district and come September there are potentially hundreds of moves. I have been following this page;
https://www.adaxes.com/questions/1113/schedule-a-user-to-be-added-to-a-group-via-web-interface?show=1113#q1113
But it appears to be outdated in for 2019.2 but I have been able to get the form created, with 2 fields, CustomAttributeText4 and CustomAttributeDate1.
CustomAttributeText4 is the new location from a selection of locations and CustomAttributeDate1 will be used to determine when to make the move.
I also created the custom task that runs daily at 8am. The task is laid out like this...
If the 'CustomAttributeText4' property is not empty AND
the 'CustomAttributeDate1' property equals '%datetime%' AND
the 'CustomAttributeText4' property equals 'Location A' then
Run PowerShell script 'Remove user from all location groups' for the user
Add the user to the 'All Location A Staff (mydomain.com\SD\Elementary Schools\LocationA)' group
Modify the user: clear CustomAttributeText4
Else if the 'CustomAttributeText4' property is not empty AND
the 'CustomAttributeText4' property equals 'Location B' then
Run PowerShell script 'Remove user from all location groups' for the user
Add the user to the 'All Location B Staff (mydomain.com\SD\Elementary Schools\LocationB)' group
Modify the user: clear CustomAttributeText4
<br>
<br>
While I have the scheduled task created, when I go through the form and pick the user, set the location (CustomAttributeText4) and pick the date (CustomAttributeDate1) one of my business rules automatically fires because it thinks another field has changed which I have a trigger on. The fields being used are unique so I am not sure why any thing entered in this form will trigger a business rule.
Any help would be appreciated, maybe I am misunderstanding the Custom Forms and how they work.
Also, how do you change the display text on custom fields? While I know what CustomAttributeDate1 and CustomAttributeText4 are in this context, my manager won't necessarily know when he tries to move somebody.
Thanks everybody