Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Pages - General Discussions
Answered

Filter Criteria in Item Actions not working.

(0) ShareShare
ReportReport
Posted on by 24

I have a filter criteria on the Item Actions. I only want to show the edit button when the records meet a particular criteria. But I see the Edit action for all the records. This is my filter criteria I am using.

 

<fetch version="1.0" mapping="logical" distinct="true" >
<entity name="edm_travelrequest">
<filter>
<condition attribute="edm_requeststatus" operator="in" value="">
<value>784940001</value>
<value>784940005</value>
</condition>
</filter>
</entity>
</fetch>

Categories:
  • jothivels Profile Picture
    24 on at
    Re: Filter Criteria in Item Actions not working.

    Thank you all for your help . I was able to get it to work using the following after testing with  XRM toolbox Fetch XML Tester. 

    <fetch>
    <entity name="edm_travelrequest" >
    <filter type="and" >
    <condition attribute="edm_requeststatus" operator="in" >
    <value>784940000</value>
    <value>784940001</value>
    <value>784940005</value>
    <value>784940006</value>
    </condition>
    </filter>
    </entity>
    </fetch>

  • Verified answer
    GeraldGut Profile Picture
    92 on at
    Re: Filter Criteria in Item Actions not working.

    Hi jothivels,

     

    have you tried the fetchXML within Advanced find or XrmToolbox - FetchXML Tester? 

    Are there records returned?

     

    Did you try to use the complete fetchXML within the filter field?

    Not really sure, but in my entitylists - actions the filter field accept complete fetchXML.

     

    Best regards,

    Gerald

     

  • Fubar Profile Picture
    7,966 Super User 2025 Season 1 on at
    Re: Filter Criteria in Item Actions not working.

    Have you are cleared the Portals' cache (<portalurl>/_services/about when logged in as a user with the Administrators web role assigned  or syncing) - as these types of changes will not push up to the portal immediately so you usual force it .

  • jothivels Profile Picture
    24 on at
    Re: Filter Criteria in Item Actions not working.

    @ragavanrajan  This did not fix the issue either.

  • ragavanrajan Profile Picture
    7,036 Most Valuable Professional on at
    Re: Filter Criteria in Item Actions not working.

    Hi @jothivels 

    I am not sure you have any link entities. But please give it a try. Sample below 

     <filter type='and'>
     <condition attribute='replace attribute name' operator='eq'/>
     </filter>
    

     

     

    Hope it helps. 
    ------------

    If you like this post, give it a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.

  • jothivels Profile Picture
    24 on at
    Re: Filter Criteria in Item Actions not working.

    That did not seem to help either. This is what I have . 

     

    jothivels_0-1664231032953.png

     

  • Fubar Profile Picture
    7,966 Super User 2025 Season 1 on at
    Re: Filter Criteria in Item Actions not working.

    Try getting rid of the value="" inside the Condition tag.

    Also, depending on where you are applying the filter you may not need the whole FetchXML e.g. for a List you only need the filter tags and its contents.

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Pages

#1
Fubar Profile Picture

Fubar 69 Super User 2025 Season 1

#2
oliver.rodrigues Profile Picture

oliver.rodrigues 49 Most Valuable Professional

#3
Jon Unzueta Profile Picture

Jon Unzueta 43