string functions in the 'assign' widget in workflows
I need to do some string manupulations in workflow. In need to split a website message delimited by : I need to pick the 2nd member of a 5 member array (if its split that is).. is there a place where the string functions that would work in workflow are listed?
-
Hi Jeff,
The server uses VB.Net and therefore any .Net classes are available as long as the proper Import is satisfied.
You can find the list of string methods available in .Net here:
http://msdn.microsoft.com/en-us/library/system.string_methods.aspx
Each one will give a VB example.
Cheers,
Chris.
0 -
Sorry for being such a newbee but I still am getting an error: I am just leaning how to use .net in the workflow.
string1 is a type string and is a long message returned in json.
string1array defined as type string[]
I need to split it into parts and discover the second member of the array.
string1array = string1.Split(':') give me an expression expected. could you possibly write out a example or two for me??
I would be so grateful.
JEff
0 -
Hi Jeff,
You should be able to use:
variable1.Split(":".ToCharArray())(1)
where variable1 is the variable containing your json string. And I'm accessing the second element using (1) since the results of Split start at zero.
Cheers,
Chris.
P.S. I've included a small workflow that demonstrates this.
http://data.latitudegeo.com/support/GSC/splitworkflow.zip (edit: link updated)
0 -
Link don't work
Would very much like to see your Example
Regards
David
0 -
Hi David,
I updated the link above to download a zip file instead of a xaml file, which can be blocked by some browsers. You should be able to download it now.
-Victoria
0 -
The link above doesn't work. 0 -
You can download the workflow now from here: http://data.latitudegeo.com/support/GSC/splitworkflow.zip 0 -
Thanks, Victoria. I was not finding this syntax anywhere online, but your example works very well! 0 -
I prefer System.Text.RegularExpressions.Regex.Split(source_string_var, split_string_var)(n) 0
Please sign in to leave a comment.
Comments
9 comments