I am querying from this dataset. From the documentation I know there is a variable disp_date (floating_timestamp). From the documentation I think I should be able to use the between ... and ... on disp_date.
Suppose I want from 2016-01-01 to 2016-02-31. I tried the following:
https://data.brla.gov/resource/4w4d-4es6.json?disp_date between 2016-01-01T00:00:00.000 and 2016-02-01T00:00:00.000
{
"error" : true,
"message" : "Unrecognized arguments [disp_date between 2016-01-01T00:00:00.000 and 2016-02-01T00:00:00.000]"
}
It looks like you're missing $where statement at the beginning. Also, need some quotes around the dates. This worked for me:
https://data.brla.gov/resource/4w4d-4es6.json?$where=disp_date between '2016-01-01T00:00:00.000' and '2016-02-01T00:00:00.000'
With HTML encoding:
https://data.brla.gov/resource/4w4d-4es6.json?$where=disp_date%20between%20%272016-01-01T00:00:00.000%27%20and%20%272016-02-01T00:00:00.000%27
Related
I want to chained alerts via json. I have this:
[
{"mes":"there are <strong>3<\/strong> messages.", "ico":"info"},
{"mes":"message1","ico":"error"},
{"mes":"message2","ico":"success"}
{"mes":"message3","ico":"warning"}
]
I want to generate 4 alerts for this json one after another. I tried with jquery.each but no success.
Please help.
that was ridiculously easy.
i sent data from php like this:
echo json_encode([
{"mes":"there are <strong>3<\/strong> messages.", "ico":"info"},
{"mes":"message1","ico":"error"},
{"mes":"message2","ico":"success"}
{"mes":"message3","ico":"warning"}
]);
and parse like this:
swal.queue(JSON.parse(data);
so i achieved what i want.
I am following an online course on a website and when I am trying to submit a query on my local MongoDB, it returns ... instead of the answer.
The query I submit is
db.scores.find( { "type" : "essay", "score" : 50 }, { student : true, _id : false ).pretty()
The "..." that I get as an "answer" from the local MongoDB server indicates that the server is expecting from me to provide it with more input.
I clearly have a syntax error on my query, I forgot to close a curly bracket.
The correct query db.scores.find( { "type" : "essay", "score" : 50 }, { student : true, _id : false } ).pretty() does not return "..."
HINT: In case the forgotten input is not in the end of the query, but somewhere in the middle (as happened in this query) you can escape the "..." mode by hitting the "enter" two times and then try to type in the new query again.
When I had this same error, its was the result of a string value being terminated prematurely due to a ' or " in the string. Look for any extraneous quotation marks or apostrophes in the values you're adding which may interfere with the declaration.
Just as addition: watch out the password string. Be aware it not to contain quotation mark which interfers with quotation mark of declaration of it, like in my case. I got ... too.
i'm facing issue in xpath-I need do a check two attribute values, if the condition satisfies need to do hard code my own value. Below is my xml.
I need to check the condition like inside subroot- if ItemType=Table1 and ItemCondition=Chair1 then i have to give a hard coded value 'Proceed'( this hard coded value i will map to target side of datamapper).
<Root>
<SubRoot>
<ItemType>Table1</ItemType>
<ItemCondition>Chair1</ItemCondition>
<ItemValue>
.......
</ItemValue>
</SubRoot>
<SubRoot>
<ItemType>Table2</ItemType>
<ItemCondition>chair2</ItemCondition>
<ItemValue>
.......
</ItemValue>
</SubRoot>
....Will have multiple subroot
</Root>
I have tried to define rules as below, but it is throwing error
Type: String
Context:/Root
Xpath: substring("Proceed", 1 div boolean(/SubRoot[ItemType="Table1" and ItemCondition="Chair1"]))
But it is throwing error like
net.sf.saxon.trans.XPathException: Arithmetic operator is not defined for arguments of types (xs:integer, xs:boolean)
Is there any other shortcut way to perform this.Could you please help me, i have given lot more effort. Not able to resolve it. Thanks in advance.
I am not sure where you are applying this but the XPath expression you are looking for is:
fn:contains(/Root/SubRoot[2]/ItemCondition, "chair") and fn:contains(/Root/SubRoot[2]/ItemType, "Table")
So here is an example returning "Proceed" or "Stop" as appropriate:
if (fn:contains(/Root/SubRoot[1]/ItemCondition, "Chair") and fn:contains(/Root/SubRoot[2]/ItemType, "Table")) then 'Proceed' else 'Stop'
To implement the above condition , i was initially tired to do in xpath, gave me lot of error. I have implemented by simple if else condition in script part of data mapper
if ( (input.ItemType == 'Table') and (input.ItemCondition == 'chair')) {
output.Item = 'Proceed'}
else {
output.Item = 'Stop '};
Make sure about your precedence. Example, Here in the xml structure( or converted POJO) ItemType has to be checked first then followed with ItemCondition.
&& not seems to be working for me, change to 'and' operator
If you were first time trying to implement the logic. It may help you.
I'm attempting to use the query builder to formulate a query based on user input on a form, but I'm running into an issue.
I've been using this code to filter and check for null/"ALL" field before which is working fine.
Like IIf([Forms]![TransactionsForm]![ComboActStatus]="ALL","*",
[Forms]![TransactionsForm]![ComboActStatus])
But I run into an issue when I want to do the same thing with fields that signify a range. I attempted this:
IIf([forms]![TransactionsForm]![txtAmountFrom] Is Null Or
[forms]![TransactionsForm]![txtAmountTo] Is Null,
([dbo_customerQuery].[amount]) Like "*",
([dbo_customerQuery].[amount])>=[forms]! [TransactionsForm]![txtAmountFrom] And
([dbo_customerQuery].[amount])<=[Forms]![TransactionsForm]![txtAmountTo])
But it's causing my entire query to fail. How can I do this similar thing? Use "Like *" in the null case (return everything), but use comparators rather than "like" statements in the second case?
Unless I'm missing something LIKE "*" will return true for all values, so this should work:
IIf([forms]![TransactionsForm]![txtAmountFrom] Is Null Or
[forms]![TransactionsForm]![txtAmountTo] Is Null,
true,
([dbo_customerQuery].[amount])>=[forms]! [TransactionsForm]![txtAmountFrom] And
[dbo_customerQuery].[amount])<=[Forms]![TransactionsForm]![txtAmountTo])
)
The code that finally worked for me, and didn't have Access split it into separate lines was:
>=IIf([forms]![TransactionsForm]![txtAmountFrom] Is Null,0,[forms]![TransactionsForm]!
[txtAmountFrom]) And <=IIf([forms]![TransactionsForm]![txtAmountTo] Is Null,9999999999,
[forms]![TransactionsForm]![txtAmountTo])
Any of you guys know how to query rally for a set of things where an string attribute value is currently not yet set?
I can’t query for the value equal to an empty string. That doesn’t parse. And I can’t use “null” either. Or rather, I can try “null” and it parses fine but it doesn’t result in finding anything.
query = #rally_api.find(:defect, :fetch =>true,
:project_scope_up => false, :project_scope_down => false,
:workspace => #workspace,
:project => #project) { equals :integration_i_d, "" }
This was followed up by telling the me to substitute "" with nil which didn't work. Null was tried to no success as well. I've tried "null" and null and "". None of them work.
I'm not familiar with our Ruby REST toolkit but directly hitting our WSAPI, you would say (<Field> = null). Notice that there are no quotes around "null".
Also, I'm wondering if the use of contains in your example above is what you wanted. You might want =.
try: { equal :integration_i_d, '""' }
Also, if rally_rest_api seems slow - we're working on something faster here:
http://developer.rallydev.com/help/ruby-rally-api