Adding a perform with two select statements in Sage 100 Visual Integrator

SOLVED

Client running Sage 100 v2018.  Trying to export purchase order information based on two select criteria that is outside standard fields.  I'm able to create a Perform for the individual selections and when I add one of the two perform functions to the export it works.  But when I assign them both using the Sequence option it doesn't work.  I tried to figure out how to join the two Select statements into one perform but I'm not a programmer and can't seem to figure it out.  The two perform selects are :

cSelectStatement$="IF PO_PurchaseOrderHeader12.DateUpdated$ <= DTE(JUL(DTE(0)) - 60:""%Y%Mz%Dz"") { selected = isTRUE  } ELSE { selected = isFALSE }"

The above perform will only select purchase orders that have been updated 60 days prior to the run date.

cSelectStatement$="IF PO_PurchaseOrderDetail01.QuantityOrdered = PO_PurchaseOrderDetail01.QuantityReceived { selected = isTRUE  } ELSE { selected = isFALSE }"

The above perform will only select purchase orders where the quantity ordered and quantity received are the same.

What I'm trying to do is select purchase orders that have not had any activity for 60 days and where the ordered and received quatities are the same.

Parents Reply Children
  • 0 in reply to David Speck

    Your assumption of me using the method in the linked post to override the select criteria was correct...thank you, David.  I had tried joining the selection criteria by using AND but must have had some syntax issue since it wasn't working for me.  However, with your code above, it works. 

    I realized there was a fault in my selection criteria since the objective is to export only PO records that have been completed based on ALL items within the Lines tab of the PO having the QtyOrdered and QtyReceived equal.  The two selection criteria I'm using will capture individual line items but that doesn't necessarily mean the full PO is complete.  I ended up adding another "AND" select criteria within the perform for the PO_PurchaseOrderHeader12.OrderStatus = "X".  It works and wanted to thank you for your solution. 

  • 0 in reply to Paul Smith - Bretthauer

    Hi Paul, if the above suggested answer helped, please do mark it as verified White check mark for the benefit of others in this forum :). Thank you!

    If you have a minute, tell us about your great experience on Sage City, take this short 3 question survey