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 / Enter variable length ...
Power Automate
Unanswered

Enter variable length array into specific excel columns

(0) ShareShare
ReportReport
Posted on by 10

I have an AI model in power automate which reads text from a PDF. The text that is read are the various strengths the person has. See picture for example. 

JS1231_1-1688433864661.png

The text is then entered into a spreadsheet. 

However, the individual strengths are picked up as a string rather than separate items.  The string is entered into one excel cell and then I manually split text to columns as I want each separate strength to go into a separate column.

I want to incorporate the splitting into my flow. I have successfully split this into an array using split function. The problem is that the arrays are variable lengths as different people have different number of strengths. 

How can I check the array length and then add the separate items into excel columns based on the number of items in the array?

JS1231_2-1688434182074.png

 

Thank you!!!

 

Categories:
I have the same question (0)
  • Verified answer
    v-bofeng-msft Profile Picture
    on at

    Hi @JS1231 ,

     

    Please try:

     

    if(greater(length(variables('TheArray')),0),variables('TheArray')[0],null)

    if(greater(length(variables('TheArray')),1),variables('TheArray')[1],null)

    if(greater(length(variables('TheArray')),2),variables('TheArray')[2],null)

    ...

     

    vbofengmsft_0-1688440901537.png

     

    Best Regards,
    Bof

     

     

  • JS1231 Profile Picture
    10 on at

    That works, thanks so much!!

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard