Copying RecordVar toSingle RecordVar

NRNR Member Posts: 78
I have two recordsets filtered on different fields of an identical table.
Is it possible to have it copied to a third recordset with record source of that same table.

For eg. I have 2 Record Variable of Item table
ItemRec1 - Which is filtered on No. 1000
ItemRec2 - which is filtered on No. 1100

Now, what is the appropriate way to copy it to a third Record Variable ItemRec3

Comments

  • kinekine Member Posts: 12,562
    It means you want to have recordvar filtered to 1000 AND 1100? Or you want to have 1000 OR 1100???
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • NRNR Member Posts: 78
    I want to have a recordset filtered on 1000 and 1100.

    Note that this is just an example to give a better picture of my query.

    Actually, the recordsets i am having has different filters but i want both in a single recordset.
    And it is not possible for me to filter it on the same recordset.

    thanks in advance
  • kinekine Member Posts: 12,562
    1) If you want to apply both filters together - intersection of the filters - (but in this example will be the result empty table, because there is no record with no. 1000 AND 1100) you can use Filtergroup to set one filter set in one group and another set in another filtergroup. In this case, all filters will be effective

    2) If you want to apply both filters with OR between them (union of the filters) - there is no easy way. You need some process which will "process" there filters and will create the result filter...

    There is no simple COPY solution for that...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • NRNR Member Posts: 78
    Kine, I ll be a more precise about my query.

    Actually, I have a Record Variable with source as X table.
    Now , I want to filter it as follows:

    1. Posting Date = 010106D and Time = 7:00:00 AM .. 11:59:00 PM
    2. Posting Date = 020106D and Time = 00:00:00 AM .. 7:00:00 AM

    What I am trying to acheive is filter on the records starting from 1st Jan '06 after 7 AM in the morning to 2nd Jan'06 7 AM morning.
    This is the Total Shift for one day.

    Hence, I used two record variables with the above filters.
    To copy it to a third record variable is a problem.

    Can you suggest me the suitable options .....
  • kinekine Member Posts: 12,562
    Some more question:

    What do you want to do with the "third" variable after you "join" the two records? You want to go through all the records and process them?
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • NRNR Member Posts: 78
    Yes I want to process the records in the third variable.

    The only reason I am taking a third variable is to have the filters(data) of both the record variables in a single record variable.
    Need not necessarily take a third variable, if there is some other option.

    Or is it possible to append the filter in ItemRec2 to the ItemRec1, so that I have filters(data) in ItemRec1
  • NRNR Member Posts: 78
    Thanks kine....

    i got the solution from the link provided ....
Sign In or Register to comment.