My assets:
Vehicle which contains an owner.
I want to list all vehicles along with its owner information using Query in queries.qry.
Using AssetRegistry I can get the results using resolveAll method, anyway how to get the same result using Query?
resolveAll isn't available in the Composer runtime at the time of writing (ie like it is in composer-client) so you can't get all resolved relationships invoking a Query (say in a TP) - see Issue
https://github.com/hyperledger/composer/issues/3454 . But you can get them via REST Filters ; adding {"include":"resolve"} as a filter, will resolve all the relationships to the asset owners and you can process the results that way.
Related
I am using the Acumatica REST endpoint https://companyName/AcumaticaERP/entity/Default/6.00.001 in my application
I am using the URL https://companyName/AcumaticaERP/entity/Default/6.00.001/StockItem?$filter=InventoryID eq '123456'&$expand=WarehouseDetails to fetch info about a Product and to get complete warehouse details
My query is how to use multiple product id's in single request, so that to get info about multiple products in single request to Acumatica Erp REST Url.
You can either use a generic GET request in order to have a list of all the records in that entity, you can append a specific ID at the end to select a single entity or you can use filters in order to restrict that list.
you might want to take a look at the following article from the Acumatica Help section:
Parameters for Retrieving Records :
https://help-2018r2.acumatica.com/(W(3))/Help?ScreenId=ShowWiki&pageid=c5e2f36a-0971-4b33-b127-3c3fe14106ff
but basically you will need to use different condition than "eq" in order to match more value. Even though there is no "in" condition
I am trying to query documentdb inside the Azure Web Document Explorer. The problem is Order By doesn't seem to work anymore.
For instance the following query:
SELECT * FROM c
WHERE c.type="myType" ORDER BY c.createdDate
When queried I get a red alert stating:
Failed to get documents. Please try again.
If I remove Order By it works fine.
Any idea why it doesn't work anymore to query with Order By?
Any idea why it doesn't work anymore to query with Order By?
Order By can be specified only against a property, either numeric or String when it is range indexed with the Maximum Precision (-1). More detail please refer to document
You also cannot perform the following:
Order By with internal string properties like id, _rid, and _self (coming soon).
Order By with properties derived from the result of an intra-document join (coming soon).
Order By multiple properties (coming soon).
Order By with queries on databases, collections, users, permissions or attachments (coming soon).
Order By with computed properties e.g. the result of an expression or a UDF/built-in function
I would like to create work order using escalation once the asset is moved to some other location (like REPAIR) using move/modify. I do understand that we can trigger CREATEWO however I am not sure on how to set the values on some fields in work order like worktype, workact , etc. Also I am unable to pick the correct record which has performed move modify ( unable to fetch the exact record using ASSETTRANS table).
Let me know if anyone has done this before, thanks in advance!
It sounds like you have an Escalation calling an Action that calls the AppAction CREATEWO. Assuming that's correct..
First, create a Relationship in DB Config between the ASSET object and WORKORDER that will find the most recent work order against this asset. You can look at the NEWWORKORDER relationships on WORKORDER and TICKET as an example. For reference, I will assume you name this relationship MYNEWWORKORDER.
Next, create some Actions against the ASSET object that use MYNEWWORKORDER.<ATTRIBUTENAME> in the Parameter/Attribute field, where <ATTRIBUTENAME> is the name of the attribute (e.g. WORKTYPE) you want to supply a value for in the Value field.
Once that is done, create an Action of type Action Group where CREATEWO is the first member and the Actions you just made are the succeeding members.
Finally, update the Escalation to call your new Action Group instead of the numbered one that the Escalation application created for you.
By default, sails will populate all relationships within a model when it's corresponding API route is hit. Does anyone know if it's possible to toggle this functionality? If I'm working with a one-to-many association, I may not want to populate the association when doing a listing of all items for performance reasons. But when viewing a single item, it would be nice to complete the population.
For example, say one ticket can have many comments. I don't care about the comments when fetching a case listing but would be important when viewing a specific case. I took a guess at how it could function but it fails:
localhost:1337/tickets?populate=false
Update
I implemented the above functionality within balderdashy/sails#1695. The only change is that you selectively choose which associations to populate using:
localhost:1337/tickets?populate=[] // Don't populate anything
localhost:1337/tickets?populate=[comments] // Only populate comments
This would override whatever is defined for populate within your blueprint config.
You just need to separate your assosiactions via comma, just like this:
localhost:1337/tickets?populate=comments,owner&SOME_OTHER_PARAMS
I am creating a Query using the Rally/Excel plug-in. I am creating the report with a base type of Task but want to include User Story information in the Query.
I have been able to do this before by adding "WorkProduct.Release" into the columns listing. That works no problem. When I attempt this with a custom field named "CR#" I get no contents being returned.
I am able to pull custom fields from the Task itself without issue it just appears to be an issue when pulling from the parent object.
I have verified the field name and that the content is actually populated. Does anyone know a way to pull this data via the excel plug-in or if there is a limitation with pulling custom field information from a parent?
In Web Serivces API Workproduct attribute is Artifact. Artifact is a parent of Task, HierarchicalRequirement (user story) and Defects, and other work item types. Those types can have custom fields created on them, but the parent Artifact is not aware of them. It is not possible to traverse from Artifact to a custom field, and it should also not be possible to traverse to Iteration or Release from Artifact. Those fields do not exist on Artifact object in the API. It is possible to traverse Workproduct.FormattedID because FormattedID attribute exists on Artifact. That's where work item types inherit the FormattedID from. If I use Workproduct.Release or Workproduct.Iteration in Excel plugin in a query on a Task object following this syntax:
(Workproduct.Iteration = /iteration/12352898163)
I get this error:
(Workproduct.Iteration.Name = it123)
will produce a similar error.
I put this to the Rally Support folks and got the following answer, so the short answer is no...can't be done:
When you query using WorkProduct.FormattedID on a task, the data can
be returned because that field is part of "Artifact". You can see
this by looking at the Web Services API information, which I have
included some screenshots to illustrate this. The custom field you
are trying to query doesn't reside on Artifact, so is not found by the
query.
The actual work product that has your custom field would be either a
defect or a story, but the Task object does not reference back to that
to allow you to query.
You could do another query for the different work products and include
the custom field, then combine the two worksheets.