Getting Object strict on disallows implicit conversions from 'String' to 'char'

Hi,

I am trying to split string using sub string where my word data looks like

Summary : Summary of the Issue
Description : Description of the Issue

Step 1: I am replacing each new line with ‘$’ symbol so that each line in the word could get into single line and stored in a variable “Word Data”

After replacing the WordData variable contains

Summary : Summary of the Issue$Description : Description of the Issue$Priority : High$Environment : UAT$$$$

image

Step 2 : I am splitting the word array with its sub string

WordData.Split(“Description :”)(0).Split(“Summary :”)(1).Trim()

image

I am expecting the above code should bring the value “Summary of the Issue”. but the actual is below

image

Could someone help me out to clear this error!!

Hi @Kirubakaran_Kannan,

Split only accepts characters to split the entire string but not the entire strings which you provide.

Split(“Summary”)(1) Instead of this, it will work as .Split(":"c)(1)

1 Like

Hi @Kirubakaran_Kannan
Check with below format:
StringVaraible.Split({“Description:”},StringSplitOptions.None)

3 Likes

Hello @Kirubakaran_Kannan,

Use the other Split function instead, should work as expected:

image

Regards,
Nithin Prabhu

3 Likes

Hi Nithin, that’s a great solution. however i tried and getting the below array bound error. Couldyou please check

Assign: Index was outside the bounds of the array.

Try this:

image

Regards,
Nithin

1 Like

Still getting the same error dude :frowning: here is the sequence for your reference.

UiDemo_Login - Imported.xaml (5.3 KB)

getting this as output.

I think you missed the change in index on the second split. A snap from your workflow with the changes highlighted (Your workflow was still pointing to Index 1):

image

Regards,
Nithin

1 Like

Hi @HareeshMR

I would require to store multiple values like this, all the value has “:” as delimiter. So i cannot go with this. Suggest me if you have any other solution

Actually im getting the output “Summary : Summary of the issue”.

but i need the value of the label which is only the “Summary of the issue” not the label.

UiDemo_Login - Imported.xaml (5.5 KB)

can you just try from yourside with my values kept in a word file

Summary : Summary of the Issue
Description : Description of the Issue

Considering scalability of the solution. I have switched to regex instead of split function. Check this out :slight_smile:

Regex_Label_Field.zip (22.2 KB)

Regards,
Nithin

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.