Post

2 followers Follow
0
Avatar

CZQL by RegularResourceLink fields

Hi Guys,

Can you guide me about the query below ?

What I want to list all timesheet entries, where the timesheets BillingRate field is different than its HumanResource.C_BillingRate value.
( this is a customer field on the regularresourcelink entity)

When I run it without the condition, it is bringing the values correctly, but when I use HumanResource.C_BillingRate in the condition, then it is giving me an error.

Query :
select ReportedBy, WorkItem, BillingRate, HumanResource.C_BillingRate
from Timesheet
where
ReportedBy = '/User/7dffc44f2fde49018db62e8a571a78c2'
and HumanResource.C_BillingRate.value <> BillingRate.value

I also tried as :

and HumanResource.C_BillingRate <> BillingRate
and HumanResource.C_BillingRate != BillingRate

 

Do you know what is the correct way of using related entity fields in the condition clause ? 

Thanks.

Mustafa Kipergil Answered

Official comment

Avatar

Hello Mustafa,

Currently we only support conditions with static values (for example:"ReportedBy = '/User/7dffc44f2fde49018db62e8a571a78c2'").

To accomplish your query you will need to do the filtering on your application side.

 

I hope this helps,

Elad

Elad Franklin

Please sign in to leave a comment.

3 comments

0
Avatar

Hi Mustafa,

The API does not support comparing two fields. By "application side" I mean that you should retrieve all the needed data and then filter it in your code. So you should retrieve both C_BillingRate and BillingRate and in your application do the comparison.

 

I hope this helps,

Elad

Elad Franklin 0 votes