Hello,
I'm trying to create a workflow that will update user's description if the company or TAM_AppsScope attributes are modified.
Company is the AD attribute (single string) whereas TAM_AppsScope is an ARS VA (multi-valued string).
In my workflow I have the 2 following activities:
1- "TAM Updated Properties" which is a Save object properties-type activity:
Target: Workflow target
Saved properties: Company, TAM_AppsScope
2- "Update Description" which is an Update-type activity:
Target: Workflow target
Updated property: Description -> Set -> Script (TAM - Update Attributes) -> Run Update-TAMDescription function
Here is the script:
function Update-TAMDescription ($Request,$Workflow)
{
$USER_AppsScope = $Workflow.SavedObjectProperties("TAM Updated Properties").get("TAM_AppsScope")
$USER_ExtCompany = $Workflow.SavedObjectProperties("TAM Updated Properties").get("company")
$ReadableApps = $USER_AppsScope -join ", "
$USER_ComputedDescription = "$USER_ExtCompany TAM account for application(s): $ReadableApps"
return "test"#$USER_ComputedDescription
}
When doing an update on the requested attributes, the workflow runs into an issue with the following error:
-
Activity 'Update Description' encountered an error.Details <<<At line: 3 char:5. You cannot call a method on a null-valued expression.
It seems that ARS does not like the $Workflow.SavedObjectProperties lines, tried to comment the first one as it is the multi-valued attribute but it is the same error at the next line for single-valued string Company.
Have you any idea if I missed something?