I am wondering if there is a way to query for subscription with a filter based on creatorId ? When I use $filter=creatorId eq guid string
I get a response of
A binary operator with incompatible types was detected. Found operand
types edm.string and edm.guid for operator kind ‘equal’
I also tried guid’xx...’ or guid[‘xxx...’] both with no luck
As the property is a string the query would be looking like this.
GET /v1.0/subscriptions?$filter=creatorid eq '844735a2-5360-4d79-b3d6-dd6aa4f567ee'
However, filtering is not supported on this property.
Related
When a direct number for the TestPlanID is given it works.
When passing the value from sheet to a Query and then appending it to URL throws an error.
Expression.Error: We cannot apply operator & to types Text and Number.
Details:
Operator=&
Left=https://analytics.dev.azure.com/OrgName/ProjName/_odata/v3.0-preview/TestPoints?$apply=filter((TestSuite/TestPlanId eq
Right=39128
Can you try
eq"""&varTPID&"""
If value of varTPID is an integer/decimal, can you change the first line in power query to varTPID=Text.From(varTestPlanID) and then use eq"""&varTPID&"""
Also I think, TestPoints?"&"$apply needs to be changed to TestPoints?$apply
I'm trying to write the derivation expression for the sum of a to many relationship attribute.
I have an item and a group, the item has a price and total price (amount * price).
I want to write an expression for the total price for the group as the sum of its components.
When I build I get the error
error: Misconfigured Property: LAEItemGroup.totalPrice key path
“items.#sum.totalPrice” uses an operator as an intermediate
component
according to the documentation and the WWDC 2019 Making Apps with Core Data it should be possible to get the sum on a to many relationship.
Could someone please help me find the correct syntax or way to do so.
As a work around I tried to write a var that worked in that class as so
#objc
public var totalPrice: Double {
value(forKeyPath: "items.#sum.totalPrice") as? Double ?? 0
}
so why the KeyPath value works but not in the model editor?
I just finished a WWDC Core Data lab with Rishi who helped me with this! You should use sum:(items.totalPrice) instead of the .#sum syntax. The parentheses syntax can also be used for some other functions (e.g. count:(items) (the number of items in the to-many relationship) or max:(items.createdAt) (the date of the most recent item)).
I've now had an opportunity to check. It seems the format used by the model editor is for the aggregate operator to be at the end of the expression (which as you point out, is different from the format used in other expressions):
items.totalPrice.#sum
Use items.totalPrice.#sum as the derived property's expression in Xcode's model editor.
This only looks to work for numeric types though? I have a property maxDate with a derived property expression of
items.createdAt.#max
It compiles but throws an error at runtime:
'NSInvalidArgumentException', reason: 'currently unsupported (too many steps)
Where Date is the data type for createdAt
I have a list of U.S. states where duplicate values are also available. I need to find how many unique states are there in a list.
'Unique' function returns all the unique states but in conjunction with 'query' function the following error message is returned:
Unable to parse query string for Function QUERY parameter 2: NO_COLUMN: A
=query(unique(A3:A26),"Select count(A)")
What am I doing wrong?
Having reconstructed the data (after UNIQUE it is different) you can't then continue with letters for column references. So:
=query(unique(A3:A26),"Select count(Col1)")
I am trying to use the Ax7 oData endpoints to search for sales quotations by Name. Using equality works just fine, but the more advanced filter functions gives me errors.
This simple EQ query works OK:
https://myAx7Server/data/SalesQuotationHeaders?$filter=SalesQuotationName eq
'Sparrow Retail'
But this query gives me the error "The type 'System.String' for the query operator is not Queryable!"
https://myAx7Server/data/SalesQuotationHeaders?$filter=startswith(SalesQuotationName,'S')
Am I doing something wrong, or is it just that these oData endpoints do not support searching by string?
Found the answer here: https://ax.help.dynamics.com/en/wiki/dynamics-ax-7-services-technical-concepts-guide/#odata-services
This is implemented as a wildcard character Example: http://host/service/EntitySet?$filter=StringField eq '*retail*'
I am using the SharePoint REST API, which is similar to OData, but currently I don't even know the standard OData way. I would like to filter items that do not start with a certain string pattern. How is the 'not' operator written in OData? All references list 'and' and 'or' operators and 'ne' operators, but I cannot find one for 'not'.
Neither of the following work:
a)
not startswith(field, 'pattern')
b)
startswith(field, 'pattern') ne true // Yes I know there is no 'true' boolean literal.
Even though the diagram from Use OData query operations in SharePoint REST requests illustrates that the proper syntax for startswith operator is:
filter=startswith(PropertyName, 'String') Eq Boolean
it seems the only syntax it accepts is:
filter=startswith(PropertyName, 'String')
For example, the request:
/_vti_bin/listdata.svc/Pages?$filter=startswith(Title,'SharePoint') eq false
returns pages those Title does not start with SharePoint
But the same request using _api service endpoint
/_api/Web/Lists/getByTitle('Pages')/items?$filter=startswith(Title,'SharePoint') eq false
returns The query is not valid exception.
Solution
Utilize listdata.svc endpoint since it fully supports the syntax of startswith operator as specified in OData specification.