Hi All,
I'm trying pass the power automated output variable %AttributeValue% with a text of "IN998877 - A-BB-CCC-DDEERFFFFRE FR" to a run VB Script to extract the output of "IN998877", but it seems neither var %AttributeValue% is not picking the value or not knowing how to be assigned with. so please help to resolve it.
Dim inputText, startPos, endPos, extractedText
inputText = %AttributeValue%
'inputText = "IN998877 - A-BB-CCC-DDEERFFFFRE FR"
startPos = InStr(inputText, "IN")
endPos = InStr(inputText, " -") - 1
If startPos > 0 And endPos > 0 Then
extractedText = Mid(inputText, startPos, endPos - startPos + 1)
WScript.Echo extractedText
Else
WScript.Echo "Text not found"
End If