Filter Created in SP REST API
Clash Royale CLAN TAG#URR8PPP
I have this code below:
jQuery.ajax(
url: res3 + "/_api/web/lists('" + normlistid + "')/items('" + normid +"')?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu",
method: "GET",
headers:
"Accept": "application/json; odata=verbose"
,
success: function (data)
if(data.d)
if(data.d.QuemLeu.results)
for (var i = 0; i < data.d.QuemLeu.results.length; i++)
if(data.d.QuemLeu.results[i].Id == userId)
document.getElementById(itemHTML).style.visibility = 'hidden';
console.log("User Found.");
break;
else
console.log("User Not Found");
,
error: function (error)
console.log(error);
);
How can I filter if the created field (Sharepoint column) is greater than "2018/10/05"?
sharepoint-online rest sharepoint-rest-api filter
add a comment |
I have this code below:
jQuery.ajax(
url: res3 + "/_api/web/lists('" + normlistid + "')/items('" + normid +"')?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu",
method: "GET",
headers:
"Accept": "application/json; odata=verbose"
,
success: function (data)
if(data.d)
if(data.d.QuemLeu.results)
for (var i = 0; i < data.d.QuemLeu.results.length; i++)
if(data.d.QuemLeu.results[i].Id == userId)
document.getElementById(itemHTML).style.visibility = 'hidden';
console.log("User Found.");
break;
else
console.log("User Not Found");
,
error: function (error)
console.log(error);
);
How can I filter if the created field (Sharepoint column) is greater than "2018/10/05"?
sharepoint-online rest sharepoint-rest-api filter
1
I don't understand you question but if you want to check if Created column is grater then '2018/10/05' (year/month/day?) usenew Date(data.d.Created) > new Date("2018-10-05")
.
– Lukas Nespor
Jan 10 at 12:25
add a comment |
I have this code below:
jQuery.ajax(
url: res3 + "/_api/web/lists('" + normlistid + "')/items('" + normid +"')?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu",
method: "GET",
headers:
"Accept": "application/json; odata=verbose"
,
success: function (data)
if(data.d)
if(data.d.QuemLeu.results)
for (var i = 0; i < data.d.QuemLeu.results.length; i++)
if(data.d.QuemLeu.results[i].Id == userId)
document.getElementById(itemHTML).style.visibility = 'hidden';
console.log("User Found.");
break;
else
console.log("User Not Found");
,
error: function (error)
console.log(error);
);
How can I filter if the created field (Sharepoint column) is greater than "2018/10/05"?
sharepoint-online rest sharepoint-rest-api filter
I have this code below:
jQuery.ajax(
url: res3 + "/_api/web/lists('" + normlistid + "')/items('" + normid +"')?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu",
method: "GET",
headers:
"Accept": "application/json; odata=verbose"
,
success: function (data)
if(data.d)
if(data.d.QuemLeu.results)
for (var i = 0; i < data.d.QuemLeu.results.length; i++)
if(data.d.QuemLeu.results[i].Id == userId)
document.getElementById(itemHTML).style.visibility = 'hidden';
console.log("User Found.");
break;
else
console.log("User Not Found");
,
error: function (error)
console.log(error);
);
How can I filter if the created field (Sharepoint column) is greater than "2018/10/05"?
sharepoint-online rest sharepoint-rest-api filter
sharepoint-online rest sharepoint-rest-api filter
edited Jan 10 at 12:20
KmDroid
asked Jan 10 at 11:09
KmDroidKmDroid
786
786
1
I don't understand you question but if you want to check if Created column is grater then '2018/10/05' (year/month/day?) usenew Date(data.d.Created) > new Date("2018-10-05")
.
– Lukas Nespor
Jan 10 at 12:25
add a comment |
1
I don't understand you question but if you want to check if Created column is grater then '2018/10/05' (year/month/day?) usenew Date(data.d.Created) > new Date("2018-10-05")
.
– Lukas Nespor
Jan 10 at 12:25
1
1
I don't understand you question but if you want to check if Created column is grater then '2018/10/05' (year/month/day?) use
new Date(data.d.Created) > new Date("2018-10-05")
.– Lukas Nespor
Jan 10 at 12:25
I don't understand you question but if you want to check if Created column is grater then '2018/10/05' (year/month/day?) use
new Date(data.d.Created) > new Date("2018-10-05")
.– Lukas Nespor
Jan 10 at 12:25
add a comment |
4 Answers
4
active
oldest
votes
SharePoint REST API endpoints take ISO formatted date string for filtering.
Try using below query for filtering on Date Field:
To check greater than "2018/10/05":
https://[tentat]/sites/[site]/Normativo/ComunicacoesDeNegocio/_api/web/lists('e97f928b-34e4-34e2-c2c7-150ea469fac3')/items?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=(Created gt datetime'2018-10-05T00:00:00Z')
To check greater than or equal to "2018/10/05":
https://[tentat]/sites/[site]/Normativo/ComunicacoesDeNegocio/_api/web/lists('e97f928b-34e4-34e2-c2c7-150ea469fac3')/items?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=(Created ge datetime'2018-10-05T00:00:00Z')
Answer For Updated Question:
Add one more IF
statement inside if(data.d)
like given below:
if(data.d)
if(new Date(data.d.Created) > new Date("2018-10-05"))
console.log("Items is created after '2018-10-05'");
else
console.log("Items is created before '2018-10-05'");
//Add your other code here
Does this works for you?
– Ganesh Sanap
Jan 10 at 12:08
The thing is I need/items('193')/
to my code working. There is another way?
– KmDroid
Jan 10 at 12:10
Actually/items('193')/
gives you the single item from list. So you cannot apply filter on such endpoint. Can you tell us what is the exact requirement of yours??
– Ganesh Sanap
Jan 10 at 12:13
I edited my post
– KmDroid
Jan 10 at 12:20
Please accept and upvote the answer and create new question instead of editing the existing question as other users have already answered on this question(by reading the original question).
– Ganesh Sanap
Jan 10 at 12:23
|
show 2 more comments
Just add
&$filter=Created gt '2018-10-05'
At the end of your endpoint
For example:
https://[tentat]/sites/[site]/Normativo/ComunicacoesDeNegocio/_api/web/lists('e97f928b-34e4-34e2-c2c7-150ea469fac3')/items('193')?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=Created gt '2018-10-05'
Gt operator means "greater than"
And also you can check all operators below:
Lt (less than)
Le (less than or equal)
Gt (greater than)
Ge (greater than or equal)
Eq (equal to)
Ne (not equal to)
1
Hello, your filter is not working, is giving me the error "the query is not valid."
– KmDroid
Jan 10 at 11:35
add a comment |
Add $filter
to your query and use Created gt datetime'2018-10-05T00:00:00'
or Created gt '2018-10-05'
/_api/web/lists('guid')/items?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=Created gt '2018-10-05'
2
Hello, your expression is not valid.
– KmDroid
Jan 10 at 11:38
Yes, you are right. I blindly copied your URL. The issue was with/items('193')/
it has to be only/items/
.
– Lukas Nespor
Jan 10 at 11:45
Hmm, interesting. I did fixed it first and get down vote, awesome :D
– Lukas Nespor
Jan 10 at 12:09
The thing is I need/items('193')/
to my code working. There is another way?
– KmDroid
Jan 10 at 12:10
So what do you want to filter? Using/items(193)/
will give you only one item, so there is nothing to filter. Update your question please, because apparently you want something different.
– Lukas Nespor
Jan 10 at 12:12
|
show 1 more comment
Use filter property $filter=Created gt '2018-10-17'
1
Hello, your expression seems to be not valid.
– KmDroid
Jan 10 at 11:36
Now, is giving me "the query is not valid".
– KmDroid
Jan 10 at 11:39
You use this filter under Items: /_api/web/lists('guid')/items?$filter=Created gt '2018-10-17'
– Zdeněk Vinduška
Jan 10 at 11:48
The thing is I need/items('193')/
to my code working. There is another way?
– KmDroid
Jan 10 at 12:11
2
So you updated your post and now as I wroted, you need IF statement, cause you only need to check if Created is GT DATE. Thats everything.
– Zdeněk Vinduška
Jan 10 at 12:29
|
show 2 more comments
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "232"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsharepoint.stackexchange.com%2fquestions%2f255543%2ffilter-created-in-sp-rest-api%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
SharePoint REST API endpoints take ISO formatted date string for filtering.
Try using below query for filtering on Date Field:
To check greater than "2018/10/05":
https://[tentat]/sites/[site]/Normativo/ComunicacoesDeNegocio/_api/web/lists('e97f928b-34e4-34e2-c2c7-150ea469fac3')/items?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=(Created gt datetime'2018-10-05T00:00:00Z')
To check greater than or equal to "2018/10/05":
https://[tentat]/sites/[site]/Normativo/ComunicacoesDeNegocio/_api/web/lists('e97f928b-34e4-34e2-c2c7-150ea469fac3')/items?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=(Created ge datetime'2018-10-05T00:00:00Z')
Answer For Updated Question:
Add one more IF
statement inside if(data.d)
like given below:
if(data.d)
if(new Date(data.d.Created) > new Date("2018-10-05"))
console.log("Items is created after '2018-10-05'");
else
console.log("Items is created before '2018-10-05'");
//Add your other code here
Does this works for you?
– Ganesh Sanap
Jan 10 at 12:08
The thing is I need/items('193')/
to my code working. There is another way?
– KmDroid
Jan 10 at 12:10
Actually/items('193')/
gives you the single item from list. So you cannot apply filter on such endpoint. Can you tell us what is the exact requirement of yours??
– Ganesh Sanap
Jan 10 at 12:13
I edited my post
– KmDroid
Jan 10 at 12:20
Please accept and upvote the answer and create new question instead of editing the existing question as other users have already answered on this question(by reading the original question).
– Ganesh Sanap
Jan 10 at 12:23
|
show 2 more comments
SharePoint REST API endpoints take ISO formatted date string for filtering.
Try using below query for filtering on Date Field:
To check greater than "2018/10/05":
https://[tentat]/sites/[site]/Normativo/ComunicacoesDeNegocio/_api/web/lists('e97f928b-34e4-34e2-c2c7-150ea469fac3')/items?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=(Created gt datetime'2018-10-05T00:00:00Z')
To check greater than or equal to "2018/10/05":
https://[tentat]/sites/[site]/Normativo/ComunicacoesDeNegocio/_api/web/lists('e97f928b-34e4-34e2-c2c7-150ea469fac3')/items?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=(Created ge datetime'2018-10-05T00:00:00Z')
Answer For Updated Question:
Add one more IF
statement inside if(data.d)
like given below:
if(data.d)
if(new Date(data.d.Created) > new Date("2018-10-05"))
console.log("Items is created after '2018-10-05'");
else
console.log("Items is created before '2018-10-05'");
//Add your other code here
Does this works for you?
– Ganesh Sanap
Jan 10 at 12:08
The thing is I need/items('193')/
to my code working. There is another way?
– KmDroid
Jan 10 at 12:10
Actually/items('193')/
gives you the single item from list. So you cannot apply filter on such endpoint. Can you tell us what is the exact requirement of yours??
– Ganesh Sanap
Jan 10 at 12:13
I edited my post
– KmDroid
Jan 10 at 12:20
Please accept and upvote the answer and create new question instead of editing the existing question as other users have already answered on this question(by reading the original question).
– Ganesh Sanap
Jan 10 at 12:23
|
show 2 more comments
SharePoint REST API endpoints take ISO formatted date string for filtering.
Try using below query for filtering on Date Field:
To check greater than "2018/10/05":
https://[tentat]/sites/[site]/Normativo/ComunicacoesDeNegocio/_api/web/lists('e97f928b-34e4-34e2-c2c7-150ea469fac3')/items?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=(Created gt datetime'2018-10-05T00:00:00Z')
To check greater than or equal to "2018/10/05":
https://[tentat]/sites/[site]/Normativo/ComunicacoesDeNegocio/_api/web/lists('e97f928b-34e4-34e2-c2c7-150ea469fac3')/items?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=(Created ge datetime'2018-10-05T00:00:00Z')
Answer For Updated Question:
Add one more IF
statement inside if(data.d)
like given below:
if(data.d)
if(new Date(data.d.Created) > new Date("2018-10-05"))
console.log("Items is created after '2018-10-05'");
else
console.log("Items is created before '2018-10-05'");
//Add your other code here
SharePoint REST API endpoints take ISO formatted date string for filtering.
Try using below query for filtering on Date Field:
To check greater than "2018/10/05":
https://[tentat]/sites/[site]/Normativo/ComunicacoesDeNegocio/_api/web/lists('e97f928b-34e4-34e2-c2c7-150ea469fac3')/items?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=(Created gt datetime'2018-10-05T00:00:00Z')
To check greater than or equal to "2018/10/05":
https://[tentat]/sites/[site]/Normativo/ComunicacoesDeNegocio/_api/web/lists('e97f928b-34e4-34e2-c2c7-150ea469fac3')/items?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=(Created ge datetime'2018-10-05T00:00:00Z')
Answer For Updated Question:
Add one more IF
statement inside if(data.d)
like given below:
if(data.d)
if(new Date(data.d.Created) > new Date("2018-10-05"))
console.log("Items is created after '2018-10-05'");
else
console.log("Items is created before '2018-10-05'");
//Add your other code here
edited Jan 10 at 12:41
answered Jan 10 at 11:51
Ganesh SanapGanesh Sanap
2,2433824
2,2433824
Does this works for you?
– Ganesh Sanap
Jan 10 at 12:08
The thing is I need/items('193')/
to my code working. There is another way?
– KmDroid
Jan 10 at 12:10
Actually/items('193')/
gives you the single item from list. So you cannot apply filter on such endpoint. Can you tell us what is the exact requirement of yours??
– Ganesh Sanap
Jan 10 at 12:13
I edited my post
– KmDroid
Jan 10 at 12:20
Please accept and upvote the answer and create new question instead of editing the existing question as other users have already answered on this question(by reading the original question).
– Ganesh Sanap
Jan 10 at 12:23
|
show 2 more comments
Does this works for you?
– Ganesh Sanap
Jan 10 at 12:08
The thing is I need/items('193')/
to my code working. There is another way?
– KmDroid
Jan 10 at 12:10
Actually/items('193')/
gives you the single item from list. So you cannot apply filter on such endpoint. Can you tell us what is the exact requirement of yours??
– Ganesh Sanap
Jan 10 at 12:13
I edited my post
– KmDroid
Jan 10 at 12:20
Please accept and upvote the answer and create new question instead of editing the existing question as other users have already answered on this question(by reading the original question).
– Ganesh Sanap
Jan 10 at 12:23
Does this works for you?
– Ganesh Sanap
Jan 10 at 12:08
Does this works for you?
– Ganesh Sanap
Jan 10 at 12:08
The thing is I need
/items('193')/
to my code working. There is another way?– KmDroid
Jan 10 at 12:10
The thing is I need
/items('193')/
to my code working. There is another way?– KmDroid
Jan 10 at 12:10
Actually
/items('193')/
gives you the single item from list. So you cannot apply filter on such endpoint. Can you tell us what is the exact requirement of yours??– Ganesh Sanap
Jan 10 at 12:13
Actually
/items('193')/
gives you the single item from list. So you cannot apply filter on such endpoint. Can you tell us what is the exact requirement of yours??– Ganesh Sanap
Jan 10 at 12:13
I edited my post
– KmDroid
Jan 10 at 12:20
I edited my post
– KmDroid
Jan 10 at 12:20
Please accept and upvote the answer and create new question instead of editing the existing question as other users have already answered on this question(by reading the original question).
– Ganesh Sanap
Jan 10 at 12:23
Please accept and upvote the answer and create new question instead of editing the existing question as other users have already answered on this question(by reading the original question).
– Ganesh Sanap
Jan 10 at 12:23
|
show 2 more comments
Just add
&$filter=Created gt '2018-10-05'
At the end of your endpoint
For example:
https://[tentat]/sites/[site]/Normativo/ComunicacoesDeNegocio/_api/web/lists('e97f928b-34e4-34e2-c2c7-150ea469fac3')/items('193')?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=Created gt '2018-10-05'
Gt operator means "greater than"
And also you can check all operators below:
Lt (less than)
Le (less than or equal)
Gt (greater than)
Ge (greater than or equal)
Eq (equal to)
Ne (not equal to)
1
Hello, your filter is not working, is giving me the error "the query is not valid."
– KmDroid
Jan 10 at 11:35
add a comment |
Just add
&$filter=Created gt '2018-10-05'
At the end of your endpoint
For example:
https://[tentat]/sites/[site]/Normativo/ComunicacoesDeNegocio/_api/web/lists('e97f928b-34e4-34e2-c2c7-150ea469fac3')/items('193')?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=Created gt '2018-10-05'
Gt operator means "greater than"
And also you can check all operators below:
Lt (less than)
Le (less than or equal)
Gt (greater than)
Ge (greater than or equal)
Eq (equal to)
Ne (not equal to)
1
Hello, your filter is not working, is giving me the error "the query is not valid."
– KmDroid
Jan 10 at 11:35
add a comment |
Just add
&$filter=Created gt '2018-10-05'
At the end of your endpoint
For example:
https://[tentat]/sites/[site]/Normativo/ComunicacoesDeNegocio/_api/web/lists('e97f928b-34e4-34e2-c2c7-150ea469fac3')/items('193')?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=Created gt '2018-10-05'
Gt operator means "greater than"
And also you can check all operators below:
Lt (less than)
Le (less than or equal)
Gt (greater than)
Ge (greater than or equal)
Eq (equal to)
Ne (not equal to)
Just add
&$filter=Created gt '2018-10-05'
At the end of your endpoint
For example:
https://[tentat]/sites/[site]/Normativo/ComunicacoesDeNegocio/_api/web/lists('e97f928b-34e4-34e2-c2c7-150ea469fac3')/items('193')?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=Created gt '2018-10-05'
Gt operator means "greater than"
And also you can check all operators below:
Lt (less than)
Le (less than or equal)
Gt (greater than)
Ge (greater than or equal)
Eq (equal to)
Ne (not equal to)
answered Jan 10 at 11:19
Thales ChemenianThales Chemenian
4971312
4971312
1
Hello, your filter is not working, is giving me the error "the query is not valid."
– KmDroid
Jan 10 at 11:35
add a comment |
1
Hello, your filter is not working, is giving me the error "the query is not valid."
– KmDroid
Jan 10 at 11:35
1
1
Hello, your filter is not working, is giving me the error "the query is not valid."
– KmDroid
Jan 10 at 11:35
Hello, your filter is not working, is giving me the error "the query is not valid."
– KmDroid
Jan 10 at 11:35
add a comment |
Add $filter
to your query and use Created gt datetime'2018-10-05T00:00:00'
or Created gt '2018-10-05'
/_api/web/lists('guid')/items?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=Created gt '2018-10-05'
2
Hello, your expression is not valid.
– KmDroid
Jan 10 at 11:38
Yes, you are right. I blindly copied your URL. The issue was with/items('193')/
it has to be only/items/
.
– Lukas Nespor
Jan 10 at 11:45
Hmm, interesting. I did fixed it first and get down vote, awesome :D
– Lukas Nespor
Jan 10 at 12:09
The thing is I need/items('193')/
to my code working. There is another way?
– KmDroid
Jan 10 at 12:10
So what do you want to filter? Using/items(193)/
will give you only one item, so there is nothing to filter. Update your question please, because apparently you want something different.
– Lukas Nespor
Jan 10 at 12:12
|
show 1 more comment
Add $filter
to your query and use Created gt datetime'2018-10-05T00:00:00'
or Created gt '2018-10-05'
/_api/web/lists('guid')/items?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=Created gt '2018-10-05'
2
Hello, your expression is not valid.
– KmDroid
Jan 10 at 11:38
Yes, you are right. I blindly copied your URL. The issue was with/items('193')/
it has to be only/items/
.
– Lukas Nespor
Jan 10 at 11:45
Hmm, interesting. I did fixed it first and get down vote, awesome :D
– Lukas Nespor
Jan 10 at 12:09
The thing is I need/items('193')/
to my code working. There is another way?
– KmDroid
Jan 10 at 12:10
So what do you want to filter? Using/items(193)/
will give you only one item, so there is nothing to filter. Update your question please, because apparently you want something different.
– Lukas Nespor
Jan 10 at 12:12
|
show 1 more comment
Add $filter
to your query and use Created gt datetime'2018-10-05T00:00:00'
or Created gt '2018-10-05'
/_api/web/lists('guid')/items?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=Created gt '2018-10-05'
Add $filter
to your query and use Created gt datetime'2018-10-05T00:00:00'
or Created gt '2018-10-05'
/_api/web/lists('guid')/items?$select=ID,Title,Created,QuemLeu/Id&$expand=QuemLeu&$filter=Created gt '2018-10-05'
edited Jan 10 at 11:40
answered Jan 10 at 11:13
Lukas NesporLukas Nespor
1,245516
1,245516
2
Hello, your expression is not valid.
– KmDroid
Jan 10 at 11:38
Yes, you are right. I blindly copied your URL. The issue was with/items('193')/
it has to be only/items/
.
– Lukas Nespor
Jan 10 at 11:45
Hmm, interesting. I did fixed it first and get down vote, awesome :D
– Lukas Nespor
Jan 10 at 12:09
The thing is I need/items('193')/
to my code working. There is another way?
– KmDroid
Jan 10 at 12:10
So what do you want to filter? Using/items(193)/
will give you only one item, so there is nothing to filter. Update your question please, because apparently you want something different.
– Lukas Nespor
Jan 10 at 12:12
|
show 1 more comment
2
Hello, your expression is not valid.
– KmDroid
Jan 10 at 11:38
Yes, you are right. I blindly copied your URL. The issue was with/items('193')/
it has to be only/items/
.
– Lukas Nespor
Jan 10 at 11:45
Hmm, interesting. I did fixed it first and get down vote, awesome :D
– Lukas Nespor
Jan 10 at 12:09
The thing is I need/items('193')/
to my code working. There is another way?
– KmDroid
Jan 10 at 12:10
So what do you want to filter? Using/items(193)/
will give you only one item, so there is nothing to filter. Update your question please, because apparently you want something different.
– Lukas Nespor
Jan 10 at 12:12
2
2
Hello, your expression is not valid.
– KmDroid
Jan 10 at 11:38
Hello, your expression is not valid.
– KmDroid
Jan 10 at 11:38
Yes, you are right. I blindly copied your URL. The issue was with
/items('193')/
it has to be only /items/
.– Lukas Nespor
Jan 10 at 11:45
Yes, you are right. I blindly copied your URL. The issue was with
/items('193')/
it has to be only /items/
.– Lukas Nespor
Jan 10 at 11:45
Hmm, interesting. I did fixed it first and get down vote, awesome :D
– Lukas Nespor
Jan 10 at 12:09
Hmm, interesting. I did fixed it first and get down vote, awesome :D
– Lukas Nespor
Jan 10 at 12:09
The thing is I need
/items('193')/
to my code working. There is another way?– KmDroid
Jan 10 at 12:10
The thing is I need
/items('193')/
to my code working. There is another way?– KmDroid
Jan 10 at 12:10
So what do you want to filter? Using
/items(193)/
will give you only one item, so there is nothing to filter. Update your question please, because apparently you want something different.– Lukas Nespor
Jan 10 at 12:12
So what do you want to filter? Using
/items(193)/
will give you only one item, so there is nothing to filter. Update your question please, because apparently you want something different.– Lukas Nespor
Jan 10 at 12:12
|
show 1 more comment
Use filter property $filter=Created gt '2018-10-17'
1
Hello, your expression seems to be not valid.
– KmDroid
Jan 10 at 11:36
Now, is giving me "the query is not valid".
– KmDroid
Jan 10 at 11:39
You use this filter under Items: /_api/web/lists('guid')/items?$filter=Created gt '2018-10-17'
– Zdeněk Vinduška
Jan 10 at 11:48
The thing is I need/items('193')/
to my code working. There is another way?
– KmDroid
Jan 10 at 12:11
2
So you updated your post and now as I wroted, you need IF statement, cause you only need to check if Created is GT DATE. Thats everything.
– Zdeněk Vinduška
Jan 10 at 12:29
|
show 2 more comments
Use filter property $filter=Created gt '2018-10-17'
1
Hello, your expression seems to be not valid.
– KmDroid
Jan 10 at 11:36
Now, is giving me "the query is not valid".
– KmDroid
Jan 10 at 11:39
You use this filter under Items: /_api/web/lists('guid')/items?$filter=Created gt '2018-10-17'
– Zdeněk Vinduška
Jan 10 at 11:48
The thing is I need/items('193')/
to my code working. There is another way?
– KmDroid
Jan 10 at 12:11
2
So you updated your post and now as I wroted, you need IF statement, cause you only need to check if Created is GT DATE. Thats everything.
– Zdeněk Vinduška
Jan 10 at 12:29
|
show 2 more comments
Use filter property $filter=Created gt '2018-10-17'
Use filter property $filter=Created gt '2018-10-17'
edited Jan 10 at 11:37
answered Jan 10 at 11:15
Zdeněk VinduškaZdeněk Vinduška
1,040216
1,040216
1
Hello, your expression seems to be not valid.
– KmDroid
Jan 10 at 11:36
Now, is giving me "the query is not valid".
– KmDroid
Jan 10 at 11:39
You use this filter under Items: /_api/web/lists('guid')/items?$filter=Created gt '2018-10-17'
– Zdeněk Vinduška
Jan 10 at 11:48
The thing is I need/items('193')/
to my code working. There is another way?
– KmDroid
Jan 10 at 12:11
2
So you updated your post and now as I wroted, you need IF statement, cause you only need to check if Created is GT DATE. Thats everything.
– Zdeněk Vinduška
Jan 10 at 12:29
|
show 2 more comments
1
Hello, your expression seems to be not valid.
– KmDroid
Jan 10 at 11:36
Now, is giving me "the query is not valid".
– KmDroid
Jan 10 at 11:39
You use this filter under Items: /_api/web/lists('guid')/items?$filter=Created gt '2018-10-17'
– Zdeněk Vinduška
Jan 10 at 11:48
The thing is I need/items('193')/
to my code working. There is another way?
– KmDroid
Jan 10 at 12:11
2
So you updated your post and now as I wroted, you need IF statement, cause you only need to check if Created is GT DATE. Thats everything.
– Zdeněk Vinduška
Jan 10 at 12:29
1
1
Hello, your expression seems to be not valid.
– KmDroid
Jan 10 at 11:36
Hello, your expression seems to be not valid.
– KmDroid
Jan 10 at 11:36
Now, is giving me "the query is not valid".
– KmDroid
Jan 10 at 11:39
Now, is giving me "the query is not valid".
– KmDroid
Jan 10 at 11:39
You use this filter under Items: /_api/web/lists('guid')/items?$filter=Created gt '2018-10-17'
– Zdeněk Vinduška
Jan 10 at 11:48
You use this filter under Items: /_api/web/lists('guid')/items?$filter=Created gt '2018-10-17'
– Zdeněk Vinduška
Jan 10 at 11:48
The thing is I need
/items('193')/
to my code working. There is another way?– KmDroid
Jan 10 at 12:11
The thing is I need
/items('193')/
to my code working. There is another way?– KmDroid
Jan 10 at 12:11
2
2
So you updated your post and now as I wroted, you need IF statement, cause you only need to check if Created is GT DATE. Thats everything.
– Zdeněk Vinduška
Jan 10 at 12:29
So you updated your post and now as I wroted, you need IF statement, cause you only need to check if Created is GT DATE. Thats everything.
– Zdeněk Vinduška
Jan 10 at 12:29
|
show 2 more comments
Thanks for contributing an answer to SharePoint Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsharepoint.stackexchange.com%2fquestions%2f255543%2ffilter-created-in-sp-rest-api%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
I don't understand you question but if you want to check if Created column is grater then '2018/10/05' (year/month/day?) use
new Date(data.d.Created) > new Date("2018-10-05")
.– Lukas Nespor
Jan 10 at 12:25