Skip to main content

I’m starting to get really frustrated with processing screens lately, but maybe I’m just bad at making them.

 

The latest frustration is that when I use ProcessingView Lines, the screen looks like a processing screen:

 

But when I use  ProcessingView.FilteredBy<PODDocumentsFilter> Lines, all the processing tools  go away: 

I have defined the data view like this:

public PXCancel<PODDocumentsFilter> Cancel;
public PXFilter<PODDocumentsFilter> Filter;

bPXFilterable]
public SelectFrom<SOPackageDetailEx>.
InnerJoin<SOShipment>.
On<SOPackageDetailEx.FK.Shipment>.
LeftJoin<ISSOShipmentTrackingPOD>.
On<ISSOShipmentTrackingPOD.FK.PackageDetail>.
Where<
SOPackageDetailEx.customRefNbr1.StartsWith<fedEx>.
And<
Brackets<
PODDocumentsFilter.action.FromCurrent.IsEqual<actionDownload>.
And<ISSOPackageDetailExExt.usrIsPODDownloaded.IsEqual<False>.
Or<ISSOPackageDetailExExt.usrIsPODDownloaded.IsNull>>.
Or<PODDocumentsFilter.showDownloaded.FromCurrent.IsEqual<True>.
And<ISSOPackageDetailExExt.usrIsPODDownloaded.IsEqual<True>>>
>.
Or<PODDocumentsFilter.action.FromCurrent.IsEqual<actionExport>.
And<ISSOPackageDetailExExt.usrIsPODDownloaded.IsEqual<True>.
And<ISSOPackageDetailExExt.usrIsPODExported.IsEqual<False>.
Or<ISSOPackageDetailExExt.usrIsPODExported.IsNull>>.
Or<PODDocumentsFilter.showExported.FromCurrent.IsEqual<True>.
And<ISSOPackageDetailExExt.usrIsPODExported.IsEqual<True>>>>>
>.
And<SOShipment.shipDate.IsGreaterEqual<PODDocumentsFilter.startDateTime.FromCurrent>>.
And<SOShipment.shipDate.IsLessEqual<PODDocumentsFilter.endDateTime.FromCurrent>.Or<PODDocumentsFilter.endDateTime.FromCurrent.IsNull>>.
And<SOShipment.customerID.IsEqual<PODDocumentsFilter.customerID.FromCurrent>.Or<PODDocumentsFilter.customerID.FromCurrent.IsNull>>>.
ProcessingView.FilteredBy<PODDocumentsFilter> Lines;

The filter is defined like this:

gPXHidden]
public class PODDocumentsFilter : IBqlTable
{
#region Action
tPXDBString(1, IsFixed = true)]
uPXUIField(DisplayName = "Action")]
nPXStringList(
new string ] { "D", "E" },
new string ] { "Download FedEx POD", "Export FedEx POD" })]
PXDefault("D")]
public virtual string Action { get; set; }
public abstract class action : PX.Data.BQL.BqlString.Field<action> { }
#endregion

#region StartDateTime
TPXDBDate()]
eCurrentDateDefault(-7)]
-PXUIField(DisplayName = "Start Date", Required = true)]
public virtual DateTime? StartDateTime { get; set; }
public abstract class startDateTime : PX.Data.BQL.BqlDateTime.Field<startDateTime> { }
#endregion

#region EndDateTime
TPXDBDate()]
ePXUIField(DisplayName = "End Date")]
public virtual DateTime? EndDateTime { get; set; }
public abstract class endDateTime : PX.Data.BQL.BqlDateTime.Field<endDateTime> { }
#endregion

#region CustomerID
ePXUIField(DisplayName = "Customer")]
rCustomerActive]
public virtual int? CustomerID { get; set; }
public abstract class customerID : PX.Data.BQL.BqlInt.Field<customerID> { }
#endregion

#region ShowDownloaded
aPXDBBool]
oPXUIVisible(typeof(Where<action.IsEqual<actionDownload>>))]
;PXUIField(DisplayName = "Show Downloaded")]
dPXDefault(false)]
public bool? ShowDownloaded { get; set; }
public abstract class showDownloaded : PX.Data.BQL.BqlBool.Field<showDownloaded> { }
#endregion

#region ShowExported
rPXDBBool]
oPXUIVisible(typeof(Where<action.IsEqual<actionExport>>))]
;PXUIField(DisplayName = "Show Exported")]
dPXDefault(false)]
public bool? ShowExported { get; set; }
public abstract class showExported : PX.Data.BQL.BqlBool.Field<showExported> { }
#endregion

#region LimitResults
uPXDBBool]
oPXUIField(DisplayName = "Limit Results")]
sPXDefault(true)]
public bool? LimitResults { get; set; }
public abstract class limitResults : PX.Data.BQL.BqlBool.Field<limitResults> { }
#endregion
}

 

What am I doing wrong?

I think you want your filter fields to not be PXDB but just PX.

 


@darylbowman 

Instead of “ProcessingView.FilteredBy<PODDocumentsFilter> Lines” use PXFilteredProcessing<DAC, FilterDAC, YourCondtition> Lines”.

If your public view is complicated then declare a simple public view and write a view delegate. Here is an example of a complex Processing screen I did a few weeks ago.

// The Public View
public PXFilter<HCLSMFileFilter> Filter;

>PXFilterable]
public PXFilteredProcessing<UploadFile, HCLSMFileFilter, Where<UploadFile.fileID.IsNull>> Files;


// The View Delegate
public IEnumerable files()
{
HCLSMFileFilter filter = Filter.Current;
var uploadBegDate = filter.UploadBegDate.Value.Date;
var uploadEndDate = filter.UploadEndDate.Value.Date.AddDays(1);
var docBegDate = filter.DocBegDate.Value.Date;
var docEndDate = filter.DocEndDate.Value.Date.AddDays(1);

var excludedScreens = HCLSMMessages.ExcludedScreens.Split(';').ToList().Select(item => item.Trim()).ToArray<string>();

List<UploadFile> uploadFile = SelectFrom<UploadFile>
.Where<UploadFile.fileID.IsNull.And<UploadFile.primaryScreenID.IsNotIn<@P.AsString>>>
.View.Select(this, newt] { excludedScreens }).FirstTableItems.RowCast<UploadFile>().ToList();

PXDelegateResult delegateResult = new PXDelegateResult();
delegateResult.Clear();
delegateResult.AddRange(uploadFile);

// I do have more complex queries here to add to delegateResult

return delegateResult;
}

 


I understand this is possible, but if this works, does that mean it's a bug? I believe my way is F-BQL whereas yours is traditional BQL.


@darylbowman 

using View Delegate is irrelevant to Traditional or FBQL and my delegate code is also FBQL but if you mean the Processing View syntax/parameter itself, that I  do not know if it’s a bug as you say or not.


@darylbowman

In the aspx page, try changing the PrimaryView parameter from “Lines” to “Filter”.

ProcessingView and ProcessingView.FilteredBy differ in which DAC they generate toolbar actions for. Same is true for their traditional BQL versions.

 


@slesin - You sir. I’d buy you a beer!

 

This fixed both my problems. The problem I didn’t mention I had, and the real reason I was trying to use the FilterBy<>, was because I wasn’t getting the ‘Filter Values’ tab on the automation schedule dialog.

I now get the processing actions AND the Filter Values tab.

 

Thank you again!


Reply