Selection filter problem

rixrixrixrix Member Posts: 121
Hello,

[Nav 5.01, TableBox tied to temporary table]

When I have on 1 form TableBox and MatrixBox I am not possible to filter multiple rows on TableBox.
I can mark multiple rows but only using Ctrl + Left Mouse Btn (they gets dark blue)

But when I use CurrForm.SETSELECTIONFILTER(Rec);
Only one row will be filtered.

After I delete MatrixBox from Form, everything works ok.
(I can mark rows also by clicking left btn and moving pointer down now.... in case above, this didn't work)

When I do this on Report RequestOptionsForm ... it works OK.

Can you help me with that ?

P.S. I can mark & filter rows on MatrixBox ... strange

P.S.2 You can try it easy by placing Tablebox on empty form, tie it to Item table (no need to be temporary) and try to mark rows. Then put MatrixBox below it (do not set anything, just place it) and try to mark ...


Thank you in advance

Comments

  • ufukufuk Member Posts: 514
    If I understood you correctly if there is a matrixbox and tablebox in the same form you can't apply multiple filter on Tablebox...
    I've checked and noticed no problem. May there be a problem with your code?
    Ufuk Asci
    Pargesoft
  • rixrixrixrix Member Posts: 121
    exactly....


    But I do not think , problem is in the code.

    Just try it. As I said:

    Create new form, place tablebox, set sourcetable for example: Item, In tablebox put "No_" column.
    Place button and on onPush triger do: Currform.SETSELECTIONFILTER(Rec);

    run it. And you can see that you can "multiselect" without problems and pressing button filters it correctly.

    Then place matrixbox.
    Do not set anything, just save and run.

    And you will see the problem.

    I really wish, problem is in some settings, but I am loosing hope :-(

    Thank you
  • ufukufuk Member Posts: 514
    I've done as you said. Placed a tablebox and matrixform on the form. Give a temp record to form and fill temp rec on the opening and apply a filter by a button with CurrForm.SETSELECTIONFILTER method... It works properly.

    If you want you can share your object here and we can look what happens there.
    Ufuk Asci
    Pargesoft
  • rixrixrixrix Member Posts: 121
    Hi ... I cant find out how to palce fob attachment ....
    So I placed the object here: http://www.krc.sk/fob/f51001.fob


    Here are some screenshots.

    1. I am able tu multiselect only using Ctrl+mouse click


    2. When I do SETSELECTIONFILTER, I will get this:
  • ufukufuk Member Posts: 514
    You've written:
    CurrForm.SETSELECTIONFILTER(Rec);
    

    Rec includes only one record when you apply this filter. So it shows only one record. You can basically use two methods here:
    Filter the record variable of your rec with the desired fields and then execute SETSELECTIONFILTER with this variable as:
    Item.SETRANGE(Item.field,rec.field); //or Item.SETVIEW(rec.GETVIEW) etc.. (depends on your case)
    CurrForm.SETSELECTIONFILTER(Item);
    

    or get the selected records on form by using the pre-existing GetSelectionFilter function on Item List form as:
    Item.SETFILTER("No.",GetSelectionFilter);
    CurrForm.SETSELECTIONFILTER(Item);
    
    Ufuk Asci
    Pargesoft
  • rixrixrixrix Member Posts: 121
    I will try what you say, but,

    Can you explain how is it possible, that when I delete Matrixbox object, everything works OK
    with my statement: CurrForm.SETSELECTIONFILTER(Rec) ?

    It filters multiple rows and show mark sign ....

    I do not think , Rec has only 1 record .... I think that marking records doesn't work properly .....


    Problem also is that with MatrixBox I can not normally select that multiple rows.
    By normally I mean, just point to row, click and hold left button and move pointer down.

    Without MatrixBox it works

    P.S. I have found out that also two Tableboxes are problem.
  • ufukufuk Member Posts: 514
    Sorry I got it wrong. You are right and it seems as a bug. You can do multiselection on matrixform but not on tablebox. In fact if the record source is same, filter result is immediately applied to the tablebox.
    So, do you really need a tablebox on the form or can find a workaround solution?
    Ufuk Asci
    Pargesoft
  • rixrixrixrix Member Posts: 121
    I really need it this way.
    In Tablebox are main data and is used most of time.
    All counts and filters I am doing here

    Matrixbox data are based on Tablebox data.
    And it's generated time to time ...
    Both are temporary tables.



    !!! I have found workaround, but in my case I lost a little bit of "user friendly design"
    By my findings, the multiselect is possible on later/last generated object when u run the form

    1. If u have just form, the multiselect works on "last inserted" object (tablebox,Matrixbox)... so you can first insert matrixbox, then tablebox, when designing

    2. My case: If you have objects in TABCONTROL, multiselect works on control which is in most on the right ....
    So I can move Matrix Tab so it is to the left of TabkleboxTAB, but it is quite strange .. I had it in order as user is generating data : Base filters, Analysis table, Matrix Table ...

    Do an1 have another solution ?

    P.S. Ther's another prob, even in this workaround. Changing VISIBILITY for "Rec.'source expression'" works for the object which is generated as first, so I will have to use extra names for all columns in Tablebox (Now I use Rec."source expression", but it takes action in matrixbox now) = You will probably not understand this explanation .. it's hard to explain when you didn't work with this .... don't worry
Sign In or Register to comment.