BUTTON FOR SORTING

Discussion in 'Requests' started by auruem, Aug 17, 2020.

    
  1. auruem

    auruem Member


    I Found this codes somewhere on net to view purchase and sales sales register in reverse order by date wise

    Is it Possible to Use a Button to Sort to change the order as per requirement.


    [#Collection: Specific Vouchers of Company]
    Delete :Sort : @@Default : $Date, $SortPosition, $VoucherTypeName
    Add : Sort : @@Default : -$VoucherNumber, $Date, $SortPosition, $VoucherTypeName

    [#Collection: Filtered Vouchers of Company]
    Delete :Sort : @@Default : $Date, $SortPosition, $VoucherTypeName
    Add : Sort : @@Default : -$VoucherNumber, $Date, $SortPosition, $VoucherTypeName
     


  2. Amit Kamdar

    Amit Kamdar Administrator Staff Member


    Yes it is possible.........
    Make a variable....Add it to report and also SET it.
    And add it to Collection...by way of OPTION.
     
    Jaydeep Shah likes this.


  3. Himanshu-2002

    Himanshu-2002 Active Member


    [Variable: Sort]
    Default: ""

    [System: Variable]
    Sort: ""

    [Function: Sort]
    00: If: ;;; Paste Your Condition Here
    10: Set: Sort: ;;Paste your filter condition here
    20: End If
    30: Display: ;; Your Report Name

    [#Collection: Filtered Vouchers of Company]
    Delete :Sort : @@Default : $Date, $SortPosition, $VoucherTypeName
    Add : Sort : @@Sort


    Do Something Like this It will work and call function using a button

    ;;Add button at Form Level
    Example:
    [Form: My Form]
    Button: SortBtn

    ;;Button Example
    [Button: Sort]
    Title: "Sort"
    Key: Alt+ T
    Action: Call: Sort
     


Share This Page