Query List Action Filter on External Content Type Column


Badge +5

Howdy,

 

I have a question on how to use the Query List Action Filter on External Content Type Column.

 

I have a list of Project Administrators that contain two columns:

Project Admin (Person Type)

Org (External Content Type)

 

I also have another list with Leave Requests. This has a bunch of other columns but the one I'm using for the filter is once again the Org (the same External Content Type). When a user enters time off request and selects the Org in the form (on the Leave Requests), the workflow should go to the Project Admin list (via the Query List Action) and look up the Project Admin using the action filter.

 

The problem I have is that I can't seem to get a match on the Project Admin Content type. (I got it to work when I used a Calculated field of the Org and matched on that or when I changed the Query List filter CAML from <Value Type="BusinessData">A02</Value> to <Value Type="Text">A02</Value>

 

CAML:

<Query>

  <Lists>

    <List ID="{xxx}" />

  </Lists>

  <ViewFields>

    <FieldRef Name="Project_x0020_Administrator" />

  </ViewFields>

  <Where>

    <Eq>

      <FieldRef Name="Org"  />

      <Value Type="BusinessData">A02</Value> <Value Type="Text">A02</Value>

    </Eq>

  </Where>

</Query>

 

I have setup a wildcard and comparison filter Read List operation of the Org External Content Type. The comparison is Code =  Parameter.

The filtering works in searches and on the list filter.

 

There must be an issue with the datatype in the Query filter (like I said I can get it to work with changing the Type="Text") so I was hoping to get someone to point out the "Correct" way of doing this.

 

Thanks!


2 replies

Userlevel 1
Badge +5

Hi Jan,

The <Value Type="BusinessData"> didnt work for me either in U2U CAML builder. What i believe is that this type need to be specific such as "Text" to retrieve data from BCS. So you are on the right track.

Please see this link .NET FOLLOWER » SharePoint: Understanding BusinessData Column (BDC Field)  about how the BusinessData type is bit complicated and you might need to choose a specific column from the BDC when you create the external column in the list

   Have you tried using the Query BCS action it will retrieve data from the Business Connectivity Service (BCS).

Thanks,

Majid

Badge +5

Thank you Majid, I'll have to do a bit more digging but the link you posted provides a nice explanation of the type.

I have not tried it with the "Query BCS" action because this was meant to be used by our content managers so they shouldn't really need to know that they're using BCS. In any event, there are plenty ways to get around this like providing them with a UDA that takes care of the BCS Query for them.

Regards,

Reply