Splitting Issue showing system.string[]

i extract data from a fake name generator . in which full name is extract. but i want to split in FirstName and LastName. so i use split function to split . but it does not work properly and showing error which i mention in screen shot. Please provide me help as soon as possible.


Thanks in advance to every one


You will need to print the variable using the FirstName(0) or (1)…

if this doesn’t work use the following:
Variable.Split({" "},StringSplitOptions.None)

Hope this helps :slight_smile:
Happy coding :slight_smile: :smiley:

@Muhammad_Jahangirwhich conditions have you applied for splitting.

Happy learning.

hi @Muhammad_Jahangir

the split function returns the output in array so you must change the variable FirstName from string to array of string.

And use Variable.Split({“/”},StringSplitOptions.None) as split variable.

Achal Sharma

ok dear:blush: i’ll try

1 Like

@Muhammad_Jahangir Try below solution and let me know

      Assign FirstName = Full_Name.Split(" ".ToCharArray)(0)
      Assign LastName =  Full_Name.Split(" ".ToCharArray)(1)

Not working dear

@Muhammad_Jahangir What error you are facing

Thanks for your replying but not working


what error is it showing?

this error


see dear

@Muhammad_Jahangir Can you attach your workflow

Check it Dear
Main.xaml (74.0 KB)

hi @Muhammad_Jahangir

instead of using Full_Name.Split(" ".ToCharArray)(1) use First_Name.Split({" "},StringSplitOptions.None) this will split whole the string into array of string and you can easily extract the firstname and lastname.

Achal Sharma

@Muhammad_Jahangir Here you go with xaml Main (5).xaml (74.6 KB) .Let me know for further help

Dear First Name is not Declared. Because i get FullName from extraction like( abcd j cdef) this is full name now i want to split into firstName like(abcd) and lastName (j) etc


Here j is a middle name and cdef is a last name

hi @Muhammad_Jahangir

so the split will be like this:

fullname.Split({" "},StringsSplitOptions.None)

this will split the full name in array of string str.
and firstname= str(0).tostring and lastname= str(1).tostring

Achal Sharma

Thanks a lot :blush: @indra