Open Forum

Expand all | Collapse all

Report Writer Conditional Calculated Field if value is Blank/Null

  • 1.  Report Writer Conditional Calculated Field if value is Blank/Null

    Posted 8 days ago
    Using GP 18.3.1245 I'm trying to modify one of our check stubs in Report Writer. I need a field added to the form that pulls from either two fields: Voucher Number or PO Number. If the receipt has a PO Number associated with it, it should pull the PO Number into the field. If there is no PO Number for that receipt, it should then pull the Voucher Number of the receipt. I've been trying to create a calculated field and messing around with a conditional statement but haven't had much luck. Any ideas on how to achieve this?
    Thanks in advance!

    ------------------------------
    Kerwin Octavo
    Fabricated Metals
    ------------------------------
    Academy - Online Interactive Learning from Experts


  • 2.  RE: Report Writer Conditional Calculated Field if value is Blank/Null

    GPUG ALL STAR
    Posted 8 days ago
    Edited by David Musgrave 8 days ago

    Hi @Kerwin Octavo

    If you can get the PO Number and Voucher number onto the report, then it should be no issue to create a conditional string calculated field.

    Expression: PO Number = ""
    True: Vocuher Number
    False: PO Number

    Can you describe more of what problems your are having?

    Regards

    David

    ​
    PS: Dexterity does not understand NULL only blank or empty string. That is why all table columns are NOT NULL in SQL.

    ------------------------------
    David Musgrave MVP, GPUG All-Star

    Managing Director
    Winthrop Development Consultants

    Perth, Western Australia

    http://www.winthropdc.com
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 3.  RE: Report Writer Conditional Calculated Field if value is Blank/Null

    Posted 7 days ago
    Hello David,

    I was able to resolve the issue. I had that exact calculated field you suggested and it still was erroring out. The issue was I had the calculated field's result type set to 'integer' assuming the PO and Voucher Number fields' data type were 'integer' as well (we only use numbers in our system), but a quick look in the SQL tables showed me they were actually string fields. Once I changed that, the calculated field worked perfectly! Thanks for the help!

    ------------------------------
    Kerwin Octavo
    Fabricated Metals
    ------------------------------

    Academy - Online Interactive Learning from Experts


  • 4.  RE: Report Writer Conditional Calculated Field if value is Blank/Null

    GPUG ALL STAR
    Posted 7 days ago
    That's why my response did say a string conditional calculated field. 😁

    Glad you have it sorted.

    ------------------------------
    David Musgrave MVP, GPUG All-Star

    Managing Director
    Winthrop Development Consultants

    Perth, Western Australia

    http://www.winthropdc.com
    ------------------------------

    Academy - Online Interactive Learning from Experts


If you've found this thread useful, dive deeper into User Group community content by role