Forums

Forums / General Discussions / How to pass dynamics variable to Fetch XML and Grid

How to pass dynamics variable to Fetch XML and Grid

Thread is closed for posting
2 posts, 1 answered
  1. Yassin Khan
    Yassin Khan avatar
    5 posts
    Registered:
    01 Nov 2018
    12 Dec 2018
    Link to this post
    I have the following query and want to filter the wga_datetoexpire to be todays date. 

    <fetch version="1.0" mapping="logical" output-format="xml-platform">
      <entity name="wga_collaboration">
        <attribute name="wga_collaborationid" />
        <attribute name="wga_collaborationname" />
        <attribute name="createdon" />
        <attribute name="wga_city" />
        <attribute name="wga_state" />
        <filter type="and">
          <condition attribute="statecode" operator="eq" value="0" />
          <condition attribute="wga_contact" operator="eq-userid" />
          <condition attribute="wga_datetoexpire" operator="on-or-after" value="12/11/2018" />
        </filter>
      </entity>
    </fetch>
  2. Yassin Khan
    Yassin Khan avatar
    5 posts
    Registered:
    01 Nov 2018
    Answered
    14 Dec 2018 in reply to Yassin Khan
    Link to this post
    I got this resolved. 

    <fetch version="1.0" mapping="logical" output-format="xml-platform">
      <entity name="wga_collaboration">
        <attribute name="wga_collaborationid" />
        <attribute name="wga_collaborationname" />
        <attribute name="createdon" />
        <attribute name="wga_city" />
        <attribute name="wga_state" />
        <attribute name="wga_city" />
        <attribute name="wga_dateposted" />
        <attribute name="wga_datetoexpire" />
        <order attribute="createdon" descending="true" />
        <filter type="and">
          <condition attribute="statecode" operator="eq" value="0" />
          <condition attribute="wga_contact" operator="eq" value="@PortalUser@" />
          <condition attribute="wga_datetoexpire" operator="next-x-years" value="100" />
        </filter>
      </entity>
    </fetch>
2 posts, 1 answered