Go Back
2 Votes

More flexibility with repository tagging


Harmony Core and SQL replication require TAGs to be defined in the repository for files with multiple record types.

This is fine if the tag is a simple record type field, but the ysntax is very limited if the conditions are more complex.  It is not possible to use brackets to nest conditions, and the maximum number of conditions is 10.  

Here are 2 examples of TAGs I need to define for a SQL replication and harmony core project.  The semicolons are where I had to comment out the TAG to allow the repository to build

   TAG Field F7RECT eq 45 and F7PREF ne "MOYERF"
       and F7PREF ne "MOYERP"
       and F7PREF ne "MOEALF"
       and F7PREF ne "MOEALP"
       and F7PREF ne "MORLSF"
       and F7PREF ne "MOBNKF"
       and F7PREF ne "MOCXLF"
       and F7PREF ne "MOURLF"
       and F7PREF ne "MOBRWF"
;       and F7PREF ne "MOBPNT"
;       and F7PREF ne "MOHHNF"
;       and F7PREF ne "MOHHNU"
;       and F7PREF ne "MOBPMF"
;       and F7PREF ne "MOPART"
;       and F7PREF ne "MOPURF"
;       and F7PREF ne "MOMNTF"
;       and F7PREF ne "MOHBRF"
;       and F7PREF ne "MOBRWX"
;       and F7PREF ne "MOADJS"
;       and F7PREF ne "MOUNHH"
;       and F7PREF ne "MOUNH2"
;       and F7PREF ne "MOUNCF"
;       and F7PREF ne "MOUNFF"
;       and F7PREF ne "      "
;       and F7PREF ne "MOCHRG"
;       and F7PREF ne "MOICRD"
;       and F7PREF ne "MORCRD"
;       and F7PREF ne "MOEXVP"
;       and F7PREF ne "MOPROT"
;       and F7PREF ne "MOCXLP"

Also, consider the following :

   TAG field FSRECT eq 45 and FSPREF eq "MOYERF"
        or FSRECT eq 45 and FSPREF eq "MOYERP" 
        or FSRECT eq 45 and FSPREF eq "MOEALF"
        or FSRECT eq 45 and FSPREF eq "MOEALP" 
        or FSRECT eq 45 and FSPREF eq "MORLSF"
    ;    or FSRECT eq 45 and FSPREF eq "MOADJS" 
    ;    or FSRECT eq 45 and FSPREF eq "MOUNH2" 
    ;    or FSRECT eq 45 and FSPREF eq "MOUNCF" 
    ;    or FSRECT eq 45 and FSPREF eq "MOUNFF" 
    ;    or FSRECT eq 45 and FSPREF eq "      " 
    ;    or FSRECT eq 45 and FSPREF eq "MOCHRG" 
    ;    or FSRECT eq 45 and FSPREF eq "MOICRD" 
    ;    or FSRECT eq 45 and FSPREF eq "MORCRD"

Ideally I would like to define this as 

   TAG field FSRECT eq 45
         and (FSPREF eq "MOYERF"
        or FSPREF eq "MOYERP" 
        or FSPREF eq "MOEALF"
        or FSPREF eq "MOEALP" 
        or FSPREF eq "MORLSF"
        or FSPREF eq "MOADJS" 
        or FSPREF eq "MOUNH2" 
        or FSPREF eq "MOUNCF" 
        or FSPREF eq "MOUNFF" 
        or FSPREF eq "      " 
        or FSPREF eq "MOCHRG" 
        or FSPREF eq "MOICRD" 
        or FSPREF eq "MORCRD")
 

3 Comments | Posted by Gordon Ireland to Repository on 10/28/2019 8:37 PM
Gary Hoffmann
Some of the older software had very complex tagging requirements.  It is vitally important if we want to be able to do projects with customers that run on software that has evolved over the years, to offer more flexibility in the repository or to offer call-back routines that can be tied to the repository so it can be done via code.
 

10/28/2019 8:57 PM   0  
Steve Ives
We've been discussing this internally and we really feel like, in the specific case you're dealing with, it would be a far better solution to alter the application to remove the "extreme" tagging requirement.

From the information we have It looks like you have 40 specific tag field values, one of which is "blank", and your issue appears to be related to a "catch all" scenario where if the tag field value is anything other than one of the 40 declared ones, the record is assigned to one of the 40.

Do you have an idea of the scope of what it would take to change the app and data to remove this scenario?

12/12/2019 6:41 PM   0  
Mark Vinten
To add to the original post, allowing the use of Regular Expressions for tagging could also help with a lot of scenario's.  Having so many IF ITS NOT conditions does seem extreme, but like with Keys, limits of 10 seem quite small and without being able to quantify between AND and OR with brackets, you can only really use very simplisit selections.

TYPE EQ 1
AND METHOD EQ 'JE'
OR METHOD EQ 'FRED'
AND SUBTYPE EQ 2

It's not clear how that will be resolved, for example.

12/13/2019 12:57 PM   0  
Please log in to comment on this idea.