Skip to main content

Notifications

Community site session details

Community site session details

Session Id : pOmavZ/c/R93nd0ToJZM3+
Power Automate - Building Flows
Answered

Modify values in array

Like (0) ShareShare
ReportReport
Posted on 3 Mar 2021 17:50:24 by 27

I created a flow.

It puts the files/subfolders properties (ID, filename, uploader etc) from a specific folder into a Sharepoint list.

I put the file IDs into filearray.

I put file IDs (column called FILE-ID) from a SharePoint list into listarray.

The problem is the following:

filearray looks like this: [222,225,221,230]

listarray looks like this: ["222","225","221","230","240"]

The column type is single-line text. I tried to change to number but it adds .0 to the value.

I'd like to compare the two arrays but because of this "it always shows differences.

 

How can I remove/add " from the values of the arrays? 

 

 

 

  • gabororsi Profile Picture
    27 on 05 Mar 2021 at 09:44:26
    Re: Modify values in array

    It's working.

    Thank you.

     

    gabororsi_0-1614937454104.png

     

  • Verified answer
    abm abm Profile Picture
    32,464 Most Valuable Professional on 05 Mar 2021 at 09:26:35
    Re: Modify values in array

    Hi @gabororsi 

     

    Your compose int() expression step should be inside the loop and the append step as well. What we are trying to do here is converting the string into an int.

     

    Thanks

  • gabororsi Profile Picture
    27 on 05 Mar 2021 at 08:47:32
    Re: Modify values in array

    Thanks for the help so far.

     

    flow array 12.jpgflow array 13.jpg

  • abm abm Profile Picture
    32,464 Most Valuable Professional on 04 Mar 2021 at 20:12:18
    Re: Modify values in array

    Hi @gabororsi 

     

    Thanks so next step try to append using the above output from the compose by converting to int()

  • gabororsi Profile Picture
    27 on 04 Mar 2021 at 18:59:51
    Re: Modify values in array

    flow array 11.jpg

  • abm abm Profile Picture
    32,464 Most Valuable Professional on 04 Mar 2021 at 18:40:34
    Re: Modify values in array

    Hi @gabororsi 

     

    Nearly there. Expand the compose step under the run history. I am interested in that.

     

    Thanks

  • gabororsi Profile Picture
    27 on 04 Mar 2021 at 18:34:53
    Re: Modify values in array

    Is this how you thought?flow array 9.jpgflow array 10.jpg

  • abm abm Profile Picture
    32,464 Most Valuable Professional on 04 Mar 2021 at 17:45:00
    Re: Modify values in array

    Hi @gabororsi 

     

    Add a compose above the append array and map the value. Do not use the int() conversion. Run the flow and see what value it returns. Let me know the results or the screenshot of your flow run history.

     

    Thanks

  • gabororsi Profile Picture
    27 on 04 Mar 2021 at 17:37:09
    Re: Modify values in array
    I put this into that but I for error
    int(outputs('Get_items_LIST')?['FILE-ID'])
    or
    int(outputs('Get_items_LIST')?['FILE_x002d_ID'])
     
    Unable to process template language expressions in action 'Append_to_array_variable_2' inputs at line '1' and column '21324': 'The template language function 'int' was invoked with a parameter that is not valid. The value cannot be converted to the target type.'.
     
  • abm abm Profile Picture
    32,464 Most Valuable Professional on 04 Mar 2021 at 13:29:30
    Re: Modify values in array

    Hi @gabororsi 

     

     

    image.png

     

    Above when you map the File-Id under the append array try to convert to integer using expression int()

     

    Thanks

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,660 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,999 Most Valuable Professional

Leaderboard
Loading started