I am on assignment 2 in level 3.
I am able to upload all WIID to the queue in orchestrator but when I am getting to the Get transaction data workflow I get this error: If more items: Value cannot be null. Parameter name: Source.
I hope that someone can help me with this as I dont understand what the error means at all…
Your WIList is empty so its giving that error. You can check that by using a WriteLine just before this if.
The issue may be that in the invoke of GetTransactionData you have not assignment the value of the in argument
How can I trim this value so I only get first name and last name?
Client Country: Country
I tried this
@nadim.warsi hope so much you can help me
just split on basis of new line and hen for 0 split basis of space and result will be
FN = text.Split((Environment.NewLine).ToCharArray)(0).Split(" “c)(0).ToString
LN = text.Split((Environment.NewLine).ToCharArray)(0).Split(” "c)(1).ToString
I am not sure how I should assign these?
just retype the " " quotes
as in copy it takes as a special char
I have been able to extract Client ID and Client Country but I am missing Client Name.
So that is why I want to keep the first line and then delete the next line which always will be “Client Country: XXX”
ok, simply use the below in your code after you are doing the getText. This will get you all 3 values
What you can do then is:
After you GetText
Use yourvar.Split(Environment.NewLine.ToArray,StringSplitOptions.RemoveEmptyEntries) - result is array of strings with index values of each line (which is =3)
First line: yourarray(0).Split(":"c)(1).Substring(1) = ClientID
Repeat for array index 1 and 2 for ClientName and Country.
Let me explain it
You have this
Your variable is a string with new lines and empty spaces.
Use yourvar.Split(Environment.NewLine.ToArray,StringSplitOptions.RemoveEmptyEntries) - to remove the new lines characters and empty spaces.
Output of this will be “ClientID: LUJ23971,Client Name: Chance Strittmatter,Client ID: PU23971” which is an array of strings say “yourarray”
To get values from array using index you do this and then take the value after “:” split again and the u…
I am just afraid to change the code as everything else works. I only need first and last name…no way to do that in another way?
what is the name of your variable which holds the text?
Means what you are setting in the messagebox?
Ill give you the expression
(So the our argument Out_ClientCountry contains the message I pasted above “Veda Blaylock etc…”
ok, but should that not be the second part ? but you want the name?
For the Name you can use this expression:
I basically only need the client name, and in this case it is Veda Blaylock
What kind of arguments/variables should I have?
than you so,sooo much for helping me a lot!!
actually to make it simple you just split and take the vales from the GetText variable and then assign each value to the out variables ID, Name and Country.
Not sure why you are getting the Name from the out_ClientCountry argument
Let me know if it works
Unfortunately I end up with an empty message box…
I think you have empty entries Try this:
or switch to second element after split
I will try both codes, and what I do is that I have an assign activity where I put one of the codes in the Value and then I assign it to out_ClientNameTrue. After that I have a write line and message box to keep track
The first code worked. AMAZING!
Thank you so much