I have values such as:-
Station-Quebec
Station-St-Marys
Stat-Test
so how i can get all the characters after the first "'-" ? so i should get :-
Quebec
St-Marys
Test
? thanks
I have values such as:-
Station-Quebec
Station-St-Marys
Stat-Test
so how i can get all the characters after the first "'-" ? so i should get :-
Quebec
St-Marys
Test
? thanks
Like this:
The two expressions in the select action are:
split(outputs('Compose'), decodeUriComponent('%0A'))
join(skip(split(item(), '-'), 1), '-')
Blog: tachytelic.net
YouTube: https://www.youtube.com/c/PaulieM/videos
If I answered your question, please accept it as a solution 😘
Hi @johnjohn123 :
I've made a test for your reference:
Reference expression:
1\split(outputs('Compose'),variables('Return'))
2\skip(items('Apply_to_each'),add(indexOf(items('Apply_to_each'),'-'),1))
The Result
Best Regards,
Bof
Hi @johnjohn123,
One approach could be to use an indexOf to determine the position of the first - character. After that you can use the length of the whole string to calculate the part you want to collect with a substring.
Below is an example of that approach:
substring(outputs('Compose'), add(indexOf(outputs('Compose'), '-'), 1), sub(length(outputs('Compose')), add(indexOf(outputs('Compose'), '-'),1)))
WarrenBelz
146,668
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,004
Most Valuable Professional