Matrixbox based on date, jump back to current date

MarcoVMarcoV Member Posts: 15
Hi,

I'm investigating a problem regarding a matrix form, where the matrix-record is based on the Date table.

What I want to do is make a button which, when clicked, let's the matrix jump back to the current date (TODAY or WORKDATE) after scrolling around.
With kind regards,

Marco de Vries

Answers

  • krikikriki Member, Moderator Posts: 9,118
    Didn't try this out, but it should be something like this:
    CurrForm.matMatrix.MatrixRec.FILTERGROUP(6); // go to another filtergroup...
    CurrForm.matMatrix.MatrixRec.setrange("Period Start",0D,TODAY); // ... to NOT overwrite a possible existing filter on period start
    CurrForm.matMatrix.MatrixRec.FIND('+'); // get the record
    CurrForm.matMatrix.MatrixRec.setrange("Period Start"); // remove this filter
    CurrForm.matMatrix.MatrixRec.FILTERGROUP(0); // get back to normal filtergroup
    
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Alain,

    You have some RSS notification installed to notify you whenever there is a new message in the mibuso.com forum containing the words "matrix form" ;-)
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • MarcoVMarcoV Member Posts: 15
    kriki wrote:
    Didn't try this out, but it should be something like this:
    CurrForm.matMatrix.MatrixRec.FILTERGROUP(6); // go to another filtergroup...
    CurrForm.matMatrix.MatrixRec.setrange("Period Start",0D,TODAY); // ... to NOT overwrite a possible existing filter on period start
    CurrForm.matMatrix.MatrixRec.FIND('+'); // get the record
    CurrForm.matMatrix.MatrixRec.setrange("Period Start"); // remove this filter
    CurrForm.matMatrix.MatrixRec.FILTERGROUP(0); // get back to normal filtergroup
    

    Thanx for your fast reply, this works great! =D>
    With kind regards,

    Marco de Vries
  • krikikriki Member, Moderator Posts: 9,118
    Alain,

    You have some RSS notification installed to notify you whenever there is a new message in the mibuso.com forum containing the words "matrix form" ;-)
    For matrix-form problems on Mibuso, I don't even need an RSS notification.
    I use the Force to feel those, Luke :wink:
    And I solve matrix-problems by manipulating the Matrix like Neo does. :wink::wink:
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.