0

I'm trying to filter by a negative number but it only seems to work with zero or positive. Does anyone know how to fix this? My query is below:

spUrl + '/SitePages/checklist.aspx?filter=ChecklistID/DueBusinessDay eq -1'

I have also tried this to no avail:

spUrl + "/SitePages/checklist.aspx?filter=ChecklistID/DueBusinessDay eq '-1'"
0

Try to use this :

/SitePages/checklist.aspx?($filter=ChecklistID/DueBusinessDay eq -1)&$expand=ChecklistID

My test code:

/_api/web/lists/getbytitle('test4')/items?$select=nun,Owner/ID&($filter=Owner/ID ge -1)&$expand=Owner

Owner is a people column.

Test result: enter image description here

| improve this answer | |
  • Thanks Amos. I do have the expand but it only works with positive or zero. It is really strange. I also tried encoding the minus sign but it did not work. Any other suggestions? – Paul Ramirez Jul 28 at 5:49
  • Did you add parentheses? – Amos_MSFT Jul 28 at 5:52
  • No I have not. Do you mean to do this: SitePages/checklist.aspx?($filter=ChecklistID/DueBusinessDay eq (-1))&$expand=ChecklistID – Paul Ramirez Jul 28 at 6:24
  • check the update. – Amos_MSFT Jul 28 at 6:33
  • I did the same but still no success. Below is my query parameters: /items?$select=Category,ID,ChecklistID/DueBusinessDay&$expand=ChecklistID&$orderby=DueDate%20asc&$filter=Period eq 'JUL-20' and ChecklistID/DueBusinessDay eq -3. It is strange that it works with only positive and zero as filter value. The column is a Lookup column. – Paul Ramirez Jul 28 at 14:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.