I am pulling data from a table based on a PXFilter. One parameter of the Where clause is to pull based on the current logged in User ID. I created a public variable _currentUser that holds the User ID.
public Guid? _currentUser = CommonServiceLocator.ServiceLocator.Current.GetInstance<ICurrentUserInformationProvider>().GetUserId();
How can I pass that value into the Select for the View? If I put an @P parameter, it compiles. If I try to use a View.Select(this, _currentUser) to pass in the parameter, I get all kinds of errors. I can’t pass in the actual _currentUser variable because I think it needs to be a type, not a value.
public SelectFrom<QTCAuditHistoryReport>. Where<QTCAuditHistoryReport.screenID.IsEqual<QTCAuditHistoryReportFilter.screenID.FromCurrent>.
I think this option would be best but I’m not sure how to do it.
I tried adding the UserID field to the Filter (invisible) so I could just use QTCAuditHistoryReportFilter.userID.FromCurrent. How would I set the value of a BQL table in the filter to be the UserID?
Best answer by Naveen BogaView original