• Resolved ecui

    (@ecui)


    Hi,

    Sorry I’m new to wordpress and dataverse integrations.

    I’m trying to do a test fetching from one table in dataverse:

    The field I’m trying to pull is called EmpID with name of cr10b_EmpID. The table name is TestTable

    The code I used as shown below:

    {% fetchxml collection="usersfetched" cache="PT30M" %}
    <fetch mapping='logical' returntotalrecordcount='true'>  
       <entity name='TestTable'>
          <attribute name='cr10b_EmpID'/>
       </entity>
    </fetch>
    {% endfetchxml %}
    
    {% if usersfetched.results.entities|length > 0 %}
        <ul>
        {% for customer in usersfetched.results.entities %}
          <li>{{usersfetched["cr10b_EmpID"]}}</li>
        {% endfor %}
        </ul>
    {% else %}
        <p>No usersfetched found.</p>
    {% endif %}
    

    It does not prompt anything however I have inserted two records for testing.

    Any hints?

    Kind regards,

    Eric

Viewing 1 replies (of 1 total)
  • Thread Starter ecui

    (@ecui)

    Hi,

    I figured out why, my list view should changed to {entity.attribute}

    Many thanks!

Viewing 1 replies (of 1 total)
  • The topic ‘FetchXML does not return anything.’ is closed to new replies.