How i can covert name= Sandhya Gajare to Name=Gajare, Sandhya
Hi @Sandhya_Gajare,
You can use this assign.
Split(name," ").Last + “, " + Split(name,” ").First
Regards
Ömer
@Sandhya_Gajare you can split the string and then concatenate the split strings in your required format using string.format
and what should i use
if my Fname=Sandhya
Lname=Gajare
and now my string =Sandhya Gajare
now that string conver to Gajare, Sandhya
You can try with
"Sandhya Gajare".Split(" "c)(1)+" "+"Sandhya Gajare".Split(" "c)(0)
Just use Lname+" "+ Fname
Regards
Gokul
FirstName=YourString.Split(" ")(0).tostring
LastName=YourString.Split(" ")(1).tostring
Name=LastName+", "+FirstName
In my code my queue data is strName=Sandhya Gajare
My excel data in column :Name=Gajare,Sandhya
To check and compaire data with queue i am using
strName.Contains(CurrentRow(“Name”).ToString) but my excel data is in Gajare,Sandhya Formate i have to match both data that queue data and excel data how i can do
Try with this expression
strName.Split(" "c)(1)+","+strName.Split(" "c)(0).Contains(CurrentRow(“Name”).ToString)
Regards
Gokul
isn’t it the same as another topic? I already provided you workflow
Anyhow, here is what I have done on another topic for you.
- Sort the excel name
- Sort the Queue Name
array[string] queueFullNameSorted = queueFullName.Split(" “c).OrderBy(Function(x) x).ToArray()
array[string] excelFullNameSorted = excelFullName.Split(” "c).OrderBy(Function(x) x).ToArray()
- join the sorted array variables
queueFullName= String.Join(" “,queueFullNameSorted ).ToUpper
excelFullName = String.Join(” ",fullNameSorted).ToUpper
- use if the condition
if(excelFullName.Contains(queueFullName))
this way your name will always be in the same order when you compare in the if statement.
Checkout this expression
String.Join(", ","Sandhya Gajare".Split(" ").ToArray().Reverse)
Hope this helps!!
Regards
Sudharsan
Thank you so much
if i use this in if loop is it work for me
@Sandhya_Gajare
Try this
(strName.Split(" "c)(1)+","+strName.Split(" "c)(0)).Contains(CurrentRow(“Name”).ToString)
Assign activity
ReverseStr = strName.ToString.Split(" "c)(1)+","+strName.ToString.Split(" "c)(0)
If activity
ReverseStr.Contains(ExcelName)
Check out the screenshot
Can you try this in your condition @Sandhya_Gajare
String.Join(", ","Sandhya Gajare".Split(" ").ToArray().Reverse).Contains(CurrentRow("Name").ToString)
Regards
Sudharsan