' Initialize the list with the actual Power Automate variable
Dim list
list = Split("%List%", ",") ' %List% should be a string like "1,2,-3,4,-5"
' Initialize the result variable
Dim result
result = ""
' Iterate through the list and check for negative values
For i = 0 To UBound(list)
If CInt(list(i)) < 0 Then
If result = "" Then
result = i
Else
result = result & "." & i
End If
End If
Next
' Output the result
WScript.Echo result
Variables.CreateNewList List=> List
Variables.AddItemToList Item: 1 List: List
Variables.AddItemToList Item: 2 List: List
Variables.AddItemToList Item: -3 List: List
Variables.AddItemToList Item: 4 List: List
Variables.AddItemToList Item: -5 List: List
Text.JoinText.JoinWithCustomDelimiter List: List CustomDelimiter: $''',''' Result=> List
@@copilotGeneratedAction: 'False'
Scripting.RunVBScript.RunVBScript VBScriptCode: $'''\' Initialize the list with the actual Power Automate variable
Dim list
list = Split(\"%List%\", \",\") \' %List% should be a string like \"1,2,-3,4,-5\"
\' Initialize the result variable
Dim result
result = \"\"
\' Iterate through the list and check for negative values
For i = 0 To UBound(list)
If CInt(list(i)) < 0 Then
If result = \"\" Then
result = i
Else
result = result & \".\" & i
End If
End If
Next
\' Output the result
WScript.Echo result
''' ScriptOutput=> VBScriptOutput ScriptError=> ScriptError
Text.Trim Text: VBScriptOutput TrimOption: Text.TrimOption.Both TrimmedText=> VBScriptOutput
eetuRobo
20
Super User 2025 Season 1
Nived_Nambiar
14
Super User 2025 Season 1
stampcoin
6