Hello,
the attached script should calculate the property value in a certain class within a certain workflow and state. The script works inside the loop, but the "if" condition is wrong. In what way could it be remade?
Dim dtToday Dim documentClass Dim iWorkflow Dim iWorkflowState documentClass = PropertyValues.SearchForProperty(100).TypedValue.DisplayValue iWorkflow = PropertyValues.SearchForProperty(38).TypedValue.DisplayValue iWorkflowState = PropertyValues.SearchForProperty(39).TypedValue.DisplayValue if documentClass = "Mileage Status" or documentClass = "Employee Car" and iWorkflowState = "2.1 Mileage Status" and iWorkflow = "Employee Car Process" then dtToday = Now Dim dtLastDay dtLastDay = DateSerial(Year(dtToday), Month(dtToday) + 1, 0) if dtToday = dtLastDay then dtLastDay = DateSerial(Year(dtToday), Month(dtToday) + 2, 0) end if Output = dtLastDay else ' ' end if