web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / The template language ...
Power Automate
Unanswered

The template language function 'split' expects its first parameter to be of type string. The provided value is of type 'Array'

(0) ShareShare
ReportReport
Posted on by 522

I have a flow which should get the number from the Filter array and exclude string 'Quote number', but i get the error message of the type string.

 

Compose QuoteNumber

split(split(body('Filter_array'),'Quote Number - ')[1],'Kind Regards')[0]

Compose - to Remove whitespace

trim(body(QuoteNumber))

 

InvalidTemplate. Unable to process template language expressions in action 'Compose_-_QuoteNumber' inputs at line '0' and column '0': 'The template language function 'split' expects its first parameter to be of type string. The provided value is of type 'Array'. Please see https://aka.ms/logicexpressions#split for usage details.'.

 

Nikhil2_0-1694164530954.png

 

Categories:
I have the same question (0)
  • ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at

    Hi @Nikhil2 

     

    Pls try the below expression for Compose QuoteNumber:

    last(split(body('Filter_array'),'Quote Number - '))

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

  • Nikhil2 Profile Picture
    522 on at

    @ManishSolanki I have tried the above expression but still shows the same error message.

     

    Nikhil2_0-1694168606759.png

     

  • ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at

    Hi @Nikhil2 

     

    Pls try the below one, ignore the previous one:

    last(split(first(body('Filter_array')),'Quote Number - '))

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

  • Nikhil2 Profile Picture
    522 on at

    @ManishSolanki Some how I get the complete value instead of number. But I need to only digits and no string.

     

    Nikhil2_0-1694177656444.png

     

  • ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at

    Hi @Nikhil2 

     

    Pls use replace() function to replace 'Quote Number - ' with empty string ('') in the output of compose action to get the digit part.

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

    Thanks

  • Nikhil2 Profile Picture
    522 on at

    @ManishSolanki I am using the expression  in compose - Replace

    replace(outputs('Compose-QuoteNumber'),'Quote Number - ','') but somehow it is same result

     

    Nikhil2_1-1694178845711.png

     

     

  • ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at

    Its working for me:

    ManishSolanki_0-1694179156266.png

    replace(outputs('Compose-QuoteNumber'),'Quote Number - ','')

     

    Output:

    ManishSolanki_1-1694179216379.png

     

    Thanks

  • Nikhil2 Profile Picture
    522 on at

    @ManishSolanki Somehow I still end up with same issue, I have a filter array on top of compose quote number in the OutPuts I get the Quote number but how come it still passes the complete value and not replacing the string.

     

    Filter Array: I get the email of the body. (HTML to Text)

    item() contains Quote Number

     

    Compose quote number:

    last(split(first(body('Filter_array')),'Quote Number - '))

     

    Compose - Replace

    replace(outputs('Compose-QuoteNumber'),'Quote Number - ','')

     

    Nikhil2_0-1694179768683.png

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard