Hey all,
I am severely stuck on this issue. I have a string that was created called GetName which contains a dynamically changing name based upon what is uploaded for example: JohnSmith, JaneDoe etc. What I want to do is to be able to separate this string based upon the location of an uppercase letter. There is no space or other special character that I can use to identify where I want the split to be so I am hoping that someone may have a better idea to perform the action.
Thanks for any and all input!
Solved! Go to Solution.
Here is one method:
FROM:
range(1,sub(length(variables('varName')),1))
MAP:
if(contains(variables('varUpper'),substring(variables('varName'),item(),1) ), item(),0)
LENGTH:
first(body('Filter_array'))
STARTING POSITION:
first(body('Filter_array'))
LENGTH:
sub(length(variables('varName')), first(body('Filter_array')))
Here is some sample runtime output:
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
Hi @ScottRoso
I've given this a go as follows:
A list of upper case letters A-Z, can be split() to create an array and the used with contains() (case sensitive) and indexof to get the position of Uppercase letters.
Select input:
split(outputs('ComposeUpperLetters'),',')
letter:
Output:
Please consider accepting my answer as a solution if it helps to solve your problem.
Cheers
Damien
Please take a look and subscribe to my YouTube Channel for more Power Platform ideas and concepts, or take a look at my website. Thanks
Here is one method:
FROM:
range(1,sub(length(variables('varName')),1))
MAP:
if(contains(variables('varUpper'),substring(variables('varName'),item(),1) ), item(),0)
LENGTH:
first(body('Filter_array'))
STARTING POSITION:
first(body('Filter_array'))
LENGTH:
sub(length(variables('varName')), first(body('Filter_array')))
Here is some sample runtime output:
Ellis
____________________________________
If I have answered your question, please mark the post as Solved.
If you like my response, please give it a Thumbs Up.
@ekarim2020 I am trying your method but for whatever reason when I am typing out the "map" portion of the code
if(contains(variables('varUpper'),substring(variables('varName'),item(),1) ), item(),0)
it constantly reverts back to the following: if(contains(variables('varUpper'),substring(variables('varName'))))
Any idea on why it would do that/possible fixes?
Sorry, I should have added a note to Switch to text mode for the Select action:
Ellis
@ekarim2020The weird thing is that I have been in text mode and it still reverts for some reason. It does not seem to want to enter any of the "item" function.
@DamoBird365Could you explain a little more on the "Select" step? The note shows split(outputs('ComposeUpperLetters'), ',')contains(outputs('ComposeName'), item()) The system does not like this and throws a flow error message. Thanks again for your help.
If you create the flow and then copy-and-paste the expression below, does it allow you to save?
if(contains(variables('varUpper'),substring(variables('varName'),item(),1) ), item(),0)
Ellis
@ekarim2020For whatever reason the copy and paste seemed to work. I do have a slightly different issue now though but the entire process works. Thank you!
User | Count |
---|---|
26 | |
15 | |
14 | |
10 | |
10 |
User | Count |
---|---|
45 | |
29 | |
29 | |
23 | |
23 |