Skip to main content

string functions in the 'assign' widget in workflows

Comments

9 comments

  • Permanently deleted user

    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
  • Permanently deleted user

    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
  • Permanently deleted user

    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
  • Permanently deleted user

    Link don't work

     

    Would very much like to see your Example

     

    Regards

     

    David

    0
  • Permanently deleted user

    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
  • Permanently deleted user
    The link above doesn't work.
    0
  • Permanently deleted user
    You can download the workflow now from here: http://data.latitudegeo.com/support/GSC/splitworkflow.zip
    0
  • Sean McClurkan
    Thanks, Victoria.  I was not finding this syntax anywhere online, but your example works very well!
    0
  • Zack Robison
    I prefer System.Text.RegularExpressions.Regex.Split(source_string_var, split_string_var)(n)
    0

Please sign in to leave a comment.