Hi
I am using Sale Order & Sale Line DataItem. On Request Page I have dropdown Capital & Revenue. Can i set in the property of Sale Line Dataitem to filter Items on the basis of Dropdown Value. If Capital is selected only those itens which are capital should be filtered.
Thanks
*This post is locked for comments
Hello,
In Sales Line Data Item - OnPreDataItem()
IF DropDownVariavle = DropDownVariavle::Capital THEN
SETRANGE(SalesLine.FieldNameThatHaveCapitalValue,DropDownVariavle::Capital)
ELSE
SETRANGE(SalesLine.FieldNameThatHaveCapitalValue,DropDownVariavle::Revenue)
Note: I suggest you to add one blankspace in your DropDownVariable, so if the user don't want to select any variable then it won't filtering.
In the OnPreDataItem for the "Sales Line" you can set a filter on a field with the value from the request page SourceExpr variable.
Hi
Can't we set filter in Sales Line DataItem properties on the value input in Request Page variable
Thanks
Report? In the OnPreDataItem for the "Sales Line" you can check the value that was selected on the request page and place your logic to set a filter on the sales line. If the value that you want to filter is not on the sales line then you could create a temporary sales line variable. Loop through the sales lines, do your check, if they match, add them to the temporary sales line variable. Then have an integer DataItem, in the OnPreDataItem, set the range of the number to be 1,salesline.count (the temporary sales line) and then in the onaftergetrecord loop through the temporary sales line variable to get the records. If this is the scenario and need more assistance let me know. I didn't want to go through it all in more detail and have it be way off base.
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,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156