Filter Created in SP REST API
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
2 days ago
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 2 days ago
KmDroid
asked 2 days ago
KmDroidKmDroid
406
406
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
2 days ago
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
2 days ago
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
2 days ago
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
2 days ago
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
2 days ago
The thing is I need/items('193')/
to my code working. There is another way?
– KmDroid
2 days ago
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
2 days ago
I edited my post
– KmDroid
2 days ago
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
2 days ago
|
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
2 days ago
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
2 days ago
Yes, you are right. I blindly copied your URL. The issue was with/items('193')/
it has to be only/items/
.
– Lukas Nespor
2 days ago
Hmm, interesting. I did fixed it first and get down vote, awesome :D
– Lukas Nespor
2 days ago
The thing is I need/items('193')/
to my code working. There is another way?
– KmDroid
2 days ago
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
2 days ago
|
show 1 more comment
Use filter property $filter=Created gt '2018-10-17'
1
Hello, your expression seems to be not valid.
– KmDroid
2 days ago
Now, is giving me "the query is not valid".
– KmDroid
2 days ago
You use this filter under Items: /_api/web/lists('guid')/items?$filter=Created gt '2018-10-17'
– Zdeněk Vinduška
2 days ago
The thing is I need/items('193')/
to my code working. There is another way?
– KmDroid
2 days ago
1
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
2 days ago
|
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
2 days ago
The thing is I need/items('193')/
to my code working. There is another way?
– KmDroid
2 days ago
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
2 days ago
I edited my post
– KmDroid
2 days ago
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
2 days ago
|
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
2 days ago
The thing is I need/items('193')/
to my code working. There is another way?
– KmDroid
2 days ago
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
2 days ago
I edited my post
– KmDroid
2 days ago
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
2 days ago
|
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 2 days ago
answered 2 days ago
Ganesh SanapGanesh Sanap
2,1403724
2,1403724
Does this works for you?
– Ganesh Sanap
2 days ago
The thing is I need/items('193')/
to my code working. There is another way?
– KmDroid
2 days ago
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
2 days ago
I edited my post
– KmDroid
2 days ago
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
2 days ago
|
show 2 more comments
Does this works for you?
– Ganesh Sanap
2 days ago
The thing is I need/items('193')/
to my code working. There is another way?
– KmDroid
2 days ago
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
2 days ago
I edited my post
– KmDroid
2 days ago
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
2 days ago
Does this works for you?
– Ganesh Sanap
2 days ago
Does this works for you?
– Ganesh Sanap
2 days ago
The thing is I need
/items('193')/
to my code working. There is another way?– KmDroid
2 days ago
The thing is I need
/items('193')/
to my code working. There is another way?– KmDroid
2 days ago
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
2 days ago
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
2 days ago
I edited my post
– KmDroid
2 days ago
I edited my post
– KmDroid
2 days ago
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
2 days ago
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
2 days ago
|
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
2 days ago
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
2 days ago
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 2 days ago
Thales ChemenianThales Chemenian
4971312
4971312
1
Hello, your filter is not working, is giving me the error "the query is not valid."
– KmDroid
2 days ago
add a comment |
1
Hello, your filter is not working, is giving me the error "the query is not valid."
– KmDroid
2 days ago
1
1
Hello, your filter is not working, is giving me the error "the query is not valid."
– KmDroid
2 days ago
Hello, your filter is not working, is giving me the error "the query is not valid."
– KmDroid
2 days ago
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
2 days ago
Yes, you are right. I blindly copied your URL. The issue was with/items('193')/
it has to be only/items/
.
– Lukas Nespor
2 days ago
Hmm, interesting. I did fixed it first and get down vote, awesome :D
– Lukas Nespor
2 days ago
The thing is I need/items('193')/
to my code working. There is another way?
– KmDroid
2 days ago
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
2 days ago
|
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
2 days ago
Yes, you are right. I blindly copied your URL. The issue was with/items('193')/
it has to be only/items/
.
– Lukas Nespor
2 days ago
Hmm, interesting. I did fixed it first and get down vote, awesome :D
– Lukas Nespor
2 days ago
The thing is I need/items('193')/
to my code working. There is another way?
– KmDroid
2 days ago
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
2 days ago
|
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 2 days ago
answered 2 days ago
Lukas NesporLukas Nespor
896315
896315
2
Hello, your expression is not valid.
– KmDroid
2 days ago
Yes, you are right. I blindly copied your URL. The issue was with/items('193')/
it has to be only/items/
.
– Lukas Nespor
2 days ago
Hmm, interesting. I did fixed it first and get down vote, awesome :D
– Lukas Nespor
2 days ago
The thing is I need/items('193')/
to my code working. There is another way?
– KmDroid
2 days ago
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
2 days ago
|
show 1 more comment
2
Hello, your expression is not valid.
– KmDroid
2 days ago
Yes, you are right. I blindly copied your URL. The issue was with/items('193')/
it has to be only/items/
.
– Lukas Nespor
2 days ago
Hmm, interesting. I did fixed it first and get down vote, awesome :D
– Lukas Nespor
2 days ago
The thing is I need/items('193')/
to my code working. There is another way?
– KmDroid
2 days ago
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
2 days ago
2
2
Hello, your expression is not valid.
– KmDroid
2 days ago
Hello, your expression is not valid.
– KmDroid
2 days ago
Yes, you are right. I blindly copied your URL. The issue was with
/items('193')/
it has to be only /items/
.– Lukas Nespor
2 days ago
Yes, you are right. I blindly copied your URL. The issue was with
/items('193')/
it has to be only /items/
.– Lukas Nespor
2 days ago
Hmm, interesting. I did fixed it first and get down vote, awesome :D
– Lukas Nespor
2 days ago
Hmm, interesting. I did fixed it first and get down vote, awesome :D
– Lukas Nespor
2 days ago
The thing is I need
/items('193')/
to my code working. There is another way?– KmDroid
2 days ago
The thing is I need
/items('193')/
to my code working. There is another way?– KmDroid
2 days ago
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
2 days ago
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
2 days ago
|
show 1 more comment
Use filter property $filter=Created gt '2018-10-17'
1
Hello, your expression seems to be not valid.
– KmDroid
2 days ago
Now, is giving me "the query is not valid".
– KmDroid
2 days ago
You use this filter under Items: /_api/web/lists('guid')/items?$filter=Created gt '2018-10-17'
– Zdeněk Vinduška
2 days ago
The thing is I need/items('193')/
to my code working. There is another way?
– KmDroid
2 days ago
1
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
2 days ago
|
show 2 more comments
Use filter property $filter=Created gt '2018-10-17'
1
Hello, your expression seems to be not valid.
– KmDroid
2 days ago
Now, is giving me "the query is not valid".
– KmDroid
2 days ago
You use this filter under Items: /_api/web/lists('guid')/items?$filter=Created gt '2018-10-17'
– Zdeněk Vinduška
2 days ago
The thing is I need/items('193')/
to my code working. There is another way?
– KmDroid
2 days ago
1
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
2 days ago
|
show 2 more comments
Use filter property $filter=Created gt '2018-10-17'
Use filter property $filter=Created gt '2018-10-17'
edited 2 days ago
answered 2 days ago
Zdeněk VinduškaZdeněk Vinduška
421110
421110
1
Hello, your expression seems to be not valid.
– KmDroid
2 days ago
Now, is giving me "the query is not valid".
– KmDroid
2 days ago
You use this filter under Items: /_api/web/lists('guid')/items?$filter=Created gt '2018-10-17'
– Zdeněk Vinduška
2 days ago
The thing is I need/items('193')/
to my code working. There is another way?
– KmDroid
2 days ago
1
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
2 days ago
|
show 2 more comments
1
Hello, your expression seems to be not valid.
– KmDroid
2 days ago
Now, is giving me "the query is not valid".
– KmDroid
2 days ago
You use this filter under Items: /_api/web/lists('guid')/items?$filter=Created gt '2018-10-17'
– Zdeněk Vinduška
2 days ago
The thing is I need/items('193')/
to my code working. There is another way?
– KmDroid
2 days ago
1
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
2 days ago
1
1
Hello, your expression seems to be not valid.
– KmDroid
2 days ago
Hello, your expression seems to be not valid.
– KmDroid
2 days ago
Now, is giving me "the query is not valid".
– KmDroid
2 days ago
Now, is giving me "the query is not valid".
– KmDroid
2 days ago
You use this filter under Items: /_api/web/lists('guid')/items?$filter=Created gt '2018-10-17'
– Zdeněk Vinduška
2 days ago
You use this filter under Items: /_api/web/lists('guid')/items?$filter=Created gt '2018-10-17'
– Zdeněk Vinduška
2 days ago
The thing is I need
/items('193')/
to my code working. There is another way?– KmDroid
2 days ago
The thing is I need
/items('193')/
to my code working. There is another way?– KmDroid
2 days ago
1
1
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
2 days ago
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
2 days ago
|
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
2 days ago