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 / Power Automate Filter ...
Power Automate
Answered

Power Automate Filter Array, no column names in the array

(0) ShareShare
ReportReport
Posted on by 10
Good Morning all
FYI I am in GCC..
 
I have an very large text file that has 300,000+ records.  I am trying to import them into a Dataverse table.  I have the import working fine. The text file contains many records, that should be excluded since they are marked as deleted.
All of the filter array examples I see go by a Column Name. My file has no column names.
 
The examples show this: item()?['Deleted']  I have tried: item()?[0].  and  item()?['0'].  and  item()[0].  
 
The error is: 
The execution of template action 'Filter_array' failed: The evaluation of 'query' action 'where' expression '@not(contains(item()?[0], 'D'))' failed: 'The template language expression 'not(contains(item()?['0'], 'D'))' cannot be evaluated because property '0' cannot be selected. Property selection is not supported on values of type 'String'.
 
Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,717 Most Valuable Professional on at
    Instead of using the [0] index to get the first character try using Starts With instead of Contains.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • rayblair Profile Picture
    10 on at
    Thanks, Pstork1.
    Does not seem to filter
     
  • VictorIvanidze Profile Picture
    13,073 on at
    Could you show a "deleted" record in your text file?
  • rayblair Profile Picture
    10 on at
     
    attached
  • Verified answer
    VictorIvanidze Profile Picture
    13,073 on at
    It works fine for me:
     
  • VictorIvanidze Profile Picture
    13,073 on at
    Did you try to run my flow?
  • rayblair Profile Picture
    10 on at
     
    Yes I was able to get that to work.
     
    Now I am trying to get another filter where records with a dash in the second column are excluded.
     
    See the attached screenshot
  • VictorIvanidze Profile Picture
    13,073 on at
    contains(split(item(),',')[2],'-')
  • rayblair Profile Picture
    10 on at
     
    Thanks much, both of the individual filters bring the records wanted.
     
    My hurdle now is I want both conditions to apply.
     
    I have this now.
    @or(    
        not(contains(split(item(), ',')[0], 'D')),
        startsWith(split(item(), ',')[1], variables('varZeros'))
        )
     
    varZeros is "0000"
     
    The problem is that both conditions apply to a single row.
     
    Here is what I mean
     
    Exclude the first row as it has a "D" in Column0 even though it does have 4 zeros in Column1
    Exclude the second row as it does not have four zeros or a "D"
    Include 3 and 4 as they have four zeros and no "D"

        "D,0000216813,PRHD,
        ",551000-001,PRHF,
        ",0000216834,PRHD,
        ",0000179169,PRHD,
     
    I have researched but can not locate my scenario...
     
    Thanks
     
     
  • VictorIvanidze Profile Picture
    13,073 on at
    A bit too many questions in a single thread, don't you think so?
    Please close this thread and create a new one.

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

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard