Hello,
I'm working with API 2.0, with CZQL queries.
I'm using the following CZQL request:
SELECT @Container, @Member
FROM GroupMembershipLink
WHERE @Container IN(
SELECT @Name
FROM UserGroup
WHERE @Name IN ('MyGroup')
) AND @Member IN (
SELECT @Name");
FROM User");
WHERE @State IN ('Active')
)
LIMIT 10
My code is:
StringBuilder CZQLStrbuild = new StringBuilder();
CZQLStrbuild.AppendLine("SELECT @Container, @Member"); // Field Names are API Field Names
CZQLStrbuild.AppendLine("FROM GroupMembershipLink");
CZQLStrbuild.AppendLine("WHERE @Container IN(");
CZQLStrbuild.AppendLine(" SELECT @Name");
CZQLStrbuild.AppendLine(" FROM UserGroup");
CZQLStrbuild.AppendLine(" WHERE @Name IN ('" + iGroupName + "')");
if (iActiveUsersOnly)
{
CZQLStrbuild.AppendLine(") AND @Member IN (");
CZQLStrbuild.AppendLine(" SELECT @Name");
CZQLStrbuild.AppendLine(" FROM User");
CZQLStrbuild.AppendLine(" WHERE @State IN ('Active')");
}
CZQLStrbuild.AppendLine(")");
CZQLStrbuild.AppendLine("LIMIT " + RecordCountOnRequest);
CZQLQuery MembersQuery = new CZQLQuery();
MembersQuery.Text = CZQLStrbuild.ToString();
QueryResult result = null;
BaseMessage[] messages = new BaseMessage[] { MembersQuery };
result = (QueryResult)_clarizenClient.Execute(messages)[0];
MembersQuery.Paging = result.Paging;
messages = new BaseMessage[] { MembersQuery };
result = (QueryResult)_clarizenClient.Execute(messages)[0];
// result.Paging.Offset is 10, but I expected it to be 20.
Could anyone help me solving this problem?
Thanks in advance,