Apply filter to get single record by field


#1

Hi Team,

I’ve created multi schema where added multiple records. Now in front end I would like to get single record based on specific field. e.g.

Schema : ProductCategoryTypes
Fields: ProductCategoryTypeId
Category

How can I get single record which has ProductCategoryTypeId = 1? I tried below syntax but it’s throwing an exception.

var record = await clientManager.GetClient<Category, CategoryData>(“productcategorytypes”).GetAsync(filter: “data/ProductCategoryTypeId eq ‘1’”);

Thanks in advance.


#2

Which exception do you get? Have you checked the same filter in the UI?

it should be data/ProductCategoryTypeId/iv eq '1'


#3

@Sebastian Now it’s working fine as you suggested. Really I appreciate your prompt support.