Hi All,
I have a lookup which is coming from EDT and I want to filter That value in the lookup.
I have added a stringEDIT field and added a EDT as RetailStoreId
I want to filter the data based on the enum value
I have override the lookup method and wrote this code:
Any Idea can we filter the value of EDT some how???
*This post is locked for comments
Yes the error in the view and the new query are no way related and due to time constraint i gave up the view approach and still wondering what could have done to make view works as it was throwing the error message in the screenshot.
I think you again forgot to tell you a few things. A lookup method surely couldn't fix the compilation error in your view, so I guess you gave up the view and solve the business requirement (which you never explained to us, so we couldn't help with it) in a different way. Am I right?
It would help if you start by explaining your actual requirement, instead of just showing a piece of code of your various attempts to solve it.
Issue is resolved I have used sysTableLookup.addLookupMethod(tableMethodStr(RAXRetailStoreStatusTable, storeName));
Thank you for the help.
above mentioned screenshot
Both cases compile correctly in my AX7 environment (I don't have any AX2012 on hand).
Don't you have any additional datasources in your view?
Can you show us a screenshot with properties of your relation?
I tried with that also it gave the same error and then I switch to dirpartyTable .
Yes, your question "Any Idea can we filter the value of EDT some how?" was indeed misleading, if your actual problem is something else.
The compilation error says: "For views relation fields in query can not come from base or derived tables". I see your relation is between OMOperatingUnitID field and DirPartyTable - shouldn't you use OMOperatingUnit table instead of DirPartyTable?
Here I have created a query to get the storeName
and then I have created a view from the query in order to fetch the StoreName but it is giving the error
Hi Martin thanks for the reply, I believe my Question heading and question description was misleading. I was able to apply range on the query but thre is a problem I was not able to bring the store name in the Query.
You can use addRange() method to add a filter to your query. Like this:
qbds.addRange(fieldNum(SON_RetailNotOpen, MyField)).value(queryValue(MyEnum::MyEnumValue));
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156