DRM validation to check the existence of nodes in a different hierarchy as a property value

Hello gurus,

I have two hierarchies, named A and B respectively. I need to create a validation for nodes in A hierarchy that checks the value of a property such that the node must have the property value equal to any node name in the hierarchy B.

Means that the values for this particular property for the nodes in A hierarchy must exist as a node in the hierarchy B.

It would be very grateful if someone can give an idea to achieve this.

Hello

Try this in a type formula validation-

NodeInHier (PropValue (Custom.PropName), B)

This returns false if the value of the property is not a node in the hierarchy B and True if it's.

So, you will get a validation message whenever the property is loaded with a value that is not a node in the hierarchy of B.

Thanks, let me know

Denzz

Tags: Business Intelligence

Similar Questions

  • How to improve the custom rule by checking the existence of the role with INSERT permission?

    Hello

    following a custom rule to check the existence of some columns of audit - how can I improve this rule only to run for tables where there is a role with privileges to INSERT?

    Günter cordially

    function checkAudit (table) {}

    inserted_by = false;

    inserted_at = false;

    ruleMessage ="";

    tNom = table.getName ();

    If (tname.indexOf ('_DWH_') == - 1).

    {

    columns = table.getElements ();

    l = columns.length;

    for (var c = 0; c < l; c ++)

    {

    CNAME = columns [c] .getName ();

    If (cname == "INSERTED_AT") {inserted_at = true}

    If (cname == "INSERTED_BY") {inserted_by = true}

    }

    If (! inserted_at) ruleMessage = ruleMessage + not 'INSERTED_AT ';

    If (! inserted_by) ruleMessage = ruleMessage + not 'INSERTED_BY ';

    }

    If (ruleMessage! = "")

    Returns false;

    on the other

    Returns true;

    }

    checkAudit (table);

    Hi Gunter,

    the function to check if the column of table a insert privilege for role is less.

    It is possible insert are defined in table instead of the column - that does not check the function below.

    Philippe

    function hasColumnWithInsertForRole(table){
        sd = table.getRelationalModel().getStorageDesign();
        tp = sd.getStorageObject(table.getObjectID());
        if(tp!=null){
            roles = sd.getRoleSet().toArray();
            for(var i=0;i-1){
                    return true;
                }
            }
        }
        return false;
    }
    hasColumnWithInsertForRole(table);
    
  • Y at - it another way to check the existence of the file other than utl_file.fgetattr oracle

    Hi, I'm checking the existence of the file in pl/sql with utl_file.

    DECLARE

    Yn BOOLEAN;

    FLEN NUMBER;

    BSIZE NUMBER;

    BEGIN

    UTL_FILE.fgetattr ('RMCMIFIDDWH_OUTPUT', - directory

    'filname.txt', - filename

    Yn, - Boolean Yes or no.

    FLEN, - length of file

    BSIZE);-block size

    IF yn THEN

    dbms_output.put_line ("'File Exists");

    ON THE OTHER

    dbms_output.put_line ('file does not exist');

    END IF;

    dbms_output.put_line (' length of file: ' |) To_char (Flen));

    dbms_output.put_line (' block size: ' |) To_char (BSIZE));

    END fgetattr;

    Please help me if there is another way to do the same thing.

    There is no problem, but I was looking for a simple method to check only file existence and for this reason only I have my question here with the solution.

  • REST API PHP: Check the existence of single room

    Y at - there a way that miss me in the api, or another way to check the existence of a single piece before calling

    AFCSAccount createRoom?   I see that there is a getRoomInfo method, but that seems to apply only to the rooms which are active (well at least I get nothing for inactive rooms, I could hurt).   I see also there is a listRooms method but when I have 10,000 rooms that will be a call quite unprofitable.

    So, I'm looking for a way to check if a room is available before calling createRoom.   Any advice would be appreciated.

    Thank you

    Eric

    Currently there is no way to verify the existence of a room (in fact, it is a way, but is not exposed).

    But considering that no matter what you do it will cost an HTTP request anyway, just always create the room and catch the error (the HTTP request returns a 403 error)

  • How to check the existence of a value in a table before copying the data?

    Experts,

    I have a requirement in which I need to copy data (4 columns) table A to table B (4 columns)

    Table A (entry)

    PART_ID PART_NAME PART_OPT_CD ENGG_OPT_CD

    1 "AAA" 10 100
    2 'BBB' 20 200
    3 'CCC' 30 300
    4 'DDD' 40 400
    5 'EEE' 50 500


    I have a table named OPTIONS with a single column. This is a table of reference of business which has the master list of option codes.

    OPT_CD
    10
    20
    30
    50
    60
    100
    200
    400
    500


    I need to copy Table A to Table B, but in doing so, I need to check the values of columns 3 and 4 in the OPTIONS array.
    If there is copy the folder B. Otherwise error in the log in a file/table and continue with the next copy

    TABLE B (exit)

    PART_ID PART_NAME PART_OPT_CD ENGG_OPT_CD

    1 "AAA" 10 100
    2 'BBB' 20 200
    5 'EEE' 50 500

    WARNING file or a table should have the details below.

    300 ENGG_OPT_CD does not exist in the table OPTIONS, so part_id 3 have not migrated
    40 PART_OPT_CD does not exist in the table OPTIONS, then part_id 4 have not migrated

    Company don't bother about the format of error, we need this information to correct the OPT_CD in the OPTIONS table.

    Can anyone suggest a better way to do this. Thank you for your help in advance

    Hello

    Its very similar to your previous post.
    Re: PL/SQL help
    The only difference being that you have to outer join to your superimposed master table, since your search in two columns values occur only in a single column on your Master table.

    Something like that;

    create table a (part_id number, part_name varchar2(10),part_opt_cd number,engg_opt_cd number);
    
    insert into a
    (select 1 Part_ID, 'AAA' Part_Name, 10 Part_Opt_CD, 100 ENGG_Opt_CD from dual union all
    select 2, 'BBB', 20, 200 from dual union all
    select 3, 'CCC', 30, 300 from dual union all
    select 4, 'DDD', 40, 400 from dual union all
    select 5, 'EEE', 50, 500 from dual union all
    select 6, 'FFF', 60, 500 from dual
    )
    /
    
    create table b (part_id number, part_name varchar2(10),part_opt_cd number,engg_opt_cd number);
    
    insert into b
    (select 1 Part_ID, 'AAA' Part_Name, 10 Part_Opt_CD, 100 ENGG_Opt_CD from dual union all
    select 2, 'BBB', 20, 200 from dual union all
    select 5, 'EEE', 50, 500 from dual
    )
    /
    
    Create table master (OPT_CD number);
    
    insert into master (
    select 10 opt_cd from dual union all
    select 20 from dual union all
    select 30 from dual union all
    select 50 from dual union all
    select 60 from dual union all
    select 100 from dual union all
    select 200 from dual union all
    select 400 from dual union all
    select 500 from dual
    )
    /
    
    create table log_msg
    (msg varchar2(100)
    ,t timestamp default current_timestamp)
    / 
    
    SQL> insert all
      2    when Master1_ID is not null and
      3         Master2_ID is not null then
      4      into b (Part_ID, Part_Name, Part_Opt_CD, ENGG_Opt_CD)
      5      values (Part_ID, Part_Name, Part_Opt_CD, ENGG_Opt_CD)
      6    when Master1_ID is null or
      7         Master2_ID is null then
      8      into log_msg (msg) values (Part_Opt_CD || ' ' || ENGG_Opt_CD || ' does not exist on the Master table')
      9  select m1.Opt_CD      as Master1_ID
     10        ,m2.Opt_CD      as master2_ID
     11        ,a.Part_ID      as Part_ID
     12        ,a.Part_Name    as Part_Name
     13        ,a.Part_Opt_CD  as Part_Opt_CD
     14        ,a.ENGG_Opt_CD  as ENGG_Opt_CD
     15  from (
     16        select a.Part_ID, a.Part_Name, a.Part_Opt_CD, a.ENGG_Opt_CD
     17        from a
     18        left outer join b on  a.Part_ID = b.Part_ID
     19        where b.Part_ID is null
     20      ) a
     21  left outer join master m1 on   a.Part_Opt_CD = m1.Opt_CD
     22  left outer join master m2 on   a.ENGG_Opt_CD = m2.Opt_CD
     23  /
    
    3 rows created.
    
    SQL> select * from log_msg;
    
    MSG                                         T
    ------------------------------------------- -------------------------
    40 400 does not exist on the Master table   05-OCT-11 09.44.17.621000
    30 300 does not exist on the Master table   05-OCT-11 09.44.17.621000
    
    SQL> select * from b;
    
       PART_ID PART_NAME  PART_OPT_CD ENGG_OPT_CD
    ---------- ---------- ----------- -----------
             1 AAA                 10         100
             2 BBB                 20         200
             5 EEE                 50         500
             6 FFF                 60         500
    

    Note, I have included an additional line in table A in order to prove that the INSERTION will occur in table B. Errors, as you can see have been inserted in the table LOG_MSG.

    Published by: bluefrog October 5, 2011 09:48

  • Validation to check the length of point

    Greetings,

    I have a column that is defined with a length of 240 in the table, and I want to give a validation error if the user types more than 240 in the corresponding point on the Apex page. I have this code in my validation routine and it is listed as PL/SQL:
    TO_NUMBER (LENGTH (:P10_ACTIVITY_COMMENT)) < 241

    When I save a record with a comment more than 240 the validation error, but an Oracle error also shows at the top of the page:
    "Invalid PL/SQL expression condition: ORA-06502: PL/SQL: digital error or value: character conversion number expression invalid PL/SQL condition error: ORA-06502: PL/SQL: digital error or value: character of number conversion error."

    I changed the code in several different ways, but they all give the Oracle error.

    How should I code it?

    Thank you, Tony

    Tony - my mistake. When I saw my answer here, I saw the double quotes. However, they are good apostrophes, so this isn't the problem. The next thing to do is to run the page in debug mode and look at the HTML code in the browser. You should see something like this:

    Scott

  • Form validation to check the areas

    Hello - is there a way to check (and reject) certain fields in a form input?  We have an internal newsletter we want to allow employees to participate in, but do not want to use personal emails (gmail, hotmail, etc.).  Is this possible?

    Hi Eric,.

    Two options:

    1 if you want just user to be alerted or encourage notification of error such as field validation, you can take a list of e-mail field externsions, put it in a table in a function javascript/Jquery and not allow those for the presentation. This can lower your form submission, in which case the user is not able to submit the form with the public/staff email addresses. In this case...

    2. you can choose the stage of processing "Update contact data of the form" in forms, make conditional, and in the condition you can choose the field domain email address and not exactly as criteria, choose the static value and enter the condition that e-mail domain (hotmail.com, yahoo.com, etc.) for each e-mail domain. See the image below:

    I hope this helps.

    Thank you

    Amit Pandya

  • How to check the existence of field in a chain at the level of the header?

    Hello


    I have a bunch of fields on my_form, just for example here in this announcement I'm on U.S. State names, say for example.

    I have 3 domains, their names are as below

    1) NY,

    2) CA,

    (3) TX

    I placed a hidden his name, a text field is FGL (I mean, the gray field list), uses this GFL for my purpose of programming

    Since the back-end (in our case, its an ERP - SAP) am filling/filling this field GFL, say for example... its data looks like, CA TX (I mean, am concatenating the names of State with a separation of a space)

    (FYI... I already have some piece of JS in my_form INITIALIZATION and for certain other purposes docReady event)

    Now my requirement is as below,

     

    (1) LOOP all objects domain (here they are like state names) of my_form, then check if their name (NY) existing data of GFL... If exisitng (in our case, its not existing) pls shaded with readOnly... If not existing

    (in our case, its not existing) pass the coloring and readOnly, go to the next loop / iteration / state / field

    Actually, I can achieve my requirement by putting the JS in initialization event each object field as mmee below, (but I have about 200 fields in my_form, that's why I want to put all the field objects of my_form in one piece of code at the level of the header in a generic way in loop),

    var myStateName = / NY /;

    var returnValue = GFL.search (myStateName);

    If (returnValue! = - 1) {;} / / This state/field/object is found in the list of fields of gray, so dimmed with readOnly

    this.ui.oneOfChild.border.fill.color.value = "192,192,192."

    This.Access = "readOnly";


    };

    For certain other requirements, one of the experts provided below JS in these forums, as below

    function findNodes (vNode) {}

    If (vNode.className = 'field') {}

    If (vNode.isPropertySpecified ("name") = true) {}

    If (.search(/_U$/g) vNode.getAttribute ('name')! ==-1) {}

    / / Script to run, when a match is found

    ...

    }

    }

    }

    for (var i = 0; i < vNode.nodes.length; i += 1) {}

    findNodes (vNode.nodes.item (i));

    }

    }

    findNodes (xfa.form);

    In fact, I tried to change the JS above according to my needs, but its does not work, please provide me with the correct JS according to my requirement.

    Thank you

    Try this:

    function findNodes (vNode) {}

    If (vNode.className = 'field') {}

    If (vNode.isPropertySpecified ("name") = true) {}

    var myStateName = new RegExp (vNode.name);

    var returnValue = GFL.search (myStateName);

    If (returnValue! =-1) {}

    this.ui.oneOfChild.border.fill.color.value = "192,192,192";

    This.Access = "ReadOnly";

    }

    else {}

    this.ui.oneOfChild.border.fill.color.value="255,255,255";//whatever color is free access

    This.Access = "Open";

    }

    }

    }

    for (var a = 0;<>

    findNodes (vNode.nodes.item (a));

    }

    }

    findNodes (xfa.form);

    Kyle

  • How to check the existence of database table?

    I want to check if a certain database table exists, if so run the code / display message etc.
    not if the table contains data or not, but if it's in the database.

    Any idea?

    Thank you!

    find a way to query the system tables, assuming that you have permission to do so. The details are specific to db.

  • checking the existence of a table - MySQL

    I use MySQL and I just want to see if a table exists so that I can select data from it or if it does not exist, I want to shoot the same fields of a table I already know exists.

    Any help would be greatly appreciated.

    Thank you

    Quote:
    Posted by: Alexandre
    using MySQL


    SELECT count (*) did testValue
    FROM information_schema.tables
    WHERE table_schema = 'the_database_name. '
    AND table_name = 'your_table_name '.



    SELECT *.
    Of your_table_name



    SELECT *.
    Of other_table_name

    Thanks Alexandre! This works perfectly. I do not administer the ColdFusion server, so I hope that administrators manage security issues.

  • best way to check the info that is in a different sequence? Recognize the ABC, ABC, correct ACBas

    I'll probably have my push of information in a table. but I don't want to check every sequence one by one, because it will take a long process. is there a better way to solve this problem? Thank you

    We know do not what you will be pushed into a table, but you can use the table or class String indexOf() method to check if they contain certain characters/elements.

    If (String("ABC"). IndexOf("C") >-1) / / C is in the string

    If (String("ABC"). IndexOf("A") >-1) / / A is in the string

    If (String("ABC"). IndexOf("B") >-1) / / B is in the string

    Only then, you can create a loop that passes through your other channel (ACR) and test each character by using a single line of the code above with the argument being a variable indexOf

    Another option would be to sort the two games that you want to compare in the tables and then see if they are equal to one.

  • Validation of DRM to restrict the number of nodes under a Parent

    Hi, I am creating a real-time validation, to limit the number of nodes under a parent to 1000. All new Member beyond 1000 should be erroneous outside. In order to achieve this, I created a property:

    VerParMemCount: String, node, derived

    Parameters: LessThanOrEqual (PropValue (Core.LeafChildren), 1000)

    This property was then used in the VerEssChldMemCountRT of Validation:

    Class: Property value is equivalent to the

    Level: node

    To check value: false

    Run this Validation: real-time batch and two

    When I test manually, it works. However in real time when I insert 1001 nodes or more from a parent, there is no notifications/errors. Any guidance how to do this job? DRM version: 11.1.2.1.107. Thanks in advance!

    Hello

    Please can you confirm - you have been assigned the validation to the level of hierarchy as the validation in real-time?

    Thank you

    Best regards

    Durai Gandhi

  • Essbase Calc to verify the existence of a Member?

    I am writing a script of CACL to move data from a member in another.  For example: 10000_AA in 10000_BB.  The challenge is that not all AA accounts exist in the hierarchy of BB and vice versa.  So, I need to check the existence of 10000_AA before trying to move in 10000_BB.

    An idea I had was to use @MATCH which returns the Member if it exists, or anything if it isn't.  But I need logic for an IF statement based on that and have not yet been able to get that.  I tried to create a CDF returns TRUE if the string is not null:

    ("LC")

    IF (@CHECK_NULL_STRING_CDF (@Name (@match ("Account", "No_Account")))

    ...

    )

    The No_Account member is there to test and exists in outline.  The calc script editor will return the error: Error: 1200414 error optimizing the formula for [LK] (line 5): [1] argument cannot have size [0] function [@CHECK_NULL_STRING_CDF].  According to me, that the editor realizes that @MATCH could return a null value, and he dislikes the idea of pass NULL in the FDC.

    Someone at - it a means to perform the verification in a calc script or to correct the mistake by passing the value in CDF?

    I don't think that you need a CDF to accomplish, but it's a really interesting question!

    Have you tried a combination of @COUNT and @MATCH (I do not know for sure that you can test the return of @COUNT, but I hope so...)?  @COUNT the number of values returned by @MATCH - if it's zero, etc.

    Another alternative would be to circumvent the problem of 'existence test' total: create a @LIST of your @MATCH (first) and a "dummy" (second) member.  Then copy the data to @MEMBERAT 1st row in the list.  If @MATCH found a match, which is the Member that you wanted.  If there no data goes out to your dummy Member safe.

    It is difficult to give specific suggestions really without understanding the larger context of the calc script, sizing, etc.

  • Checking the referential integrity of a form before the presentation of the Page element

    Hi, OTN,.

    I have a form on a table with multiple columns, some of which are foreign keys to other tables. Rather than validate the columns for referential integrity when the user inserts/changes in shape, I would use a dynamic action to attract the attention of the user with a javascript alert() when the user loses focus of the element. After a user enters a value into the text box and moves to the next item, I want to be able to query the table, check the existence of the value of the user and issue a javascript alert() if there is no match.

    What is the best way to go about this?

    I created a dynamic action-to run PL/SQL code on one of the elements of the page, with a code similar to the following:

    DECLARE
    rf_check varchar2 (30);
    BEGIN
    SELECT col1 INTO table_a FROM rf_check
    WHERE col1 =: P1_ITEM_FK;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    HTP.p ("< script type =" text/javascript"> ');
    HTP.p ("alert ("ERROR");");
    HTP.p ("< /script >" ");
    END;

    I could not get the dynamic action of delivering javascript. Any thoughts?

    Thank you

    Matthew Moisen

    Published by: Matthew Moisen on 25 October 2012 14:22

    Matthew Moisen wrote:
    What is the best way to go about this?

    I have to admit that I've never tried, but I would be surprised if Javascript back via statements made htp.p that they are actually executed by the browser.

    I would do something like that, by a dynamic action that calls an application process. The PL/SQL procedure request would return via htp.p OK or ERROR. From this result, the javascript would determine to issue the alert. Something like the following (not fully tested):

    Javascipt
    
     var get = new htmldb_Get(null,html_GetElement('pFlowId').value, 'APPLICATION_PROCESS=FK_CHECK',0);
     var fk_check = get.get();
    
     if (fk_check=='ERROR')
      {
       alert('ERROR');
      }
    
    Application Process FK_CHECK
    
    DECLARE
      rf_check varchar2(30);
    BEGIN
      SELECT col1 INTO rf_check FROM table_a
      WHERE col1 = :P1_ITEM_FK;
      HTP.p('OK');
    EXCEPTION
      WHEN NO_DATA_FOUND THEN
         HTP.p('ERROR');
    END;
    
  • How to test the existence of an object in the CR

    I want to create a number of objects in my VC2.5 with Powershell server by importing a csv file.

    I would like to know how is the way to check the existence of the object before trying to create.

    Just in case I need to run the script again, my script blocks, any number of other reasons, it would be good to do a check and if the object exists, do nothing, create the object.

    I tried different combinations to try to get an answer from true / false or another who did not return an error like below, so I can get the script to act accordingly

    
    PS C:\Data&gt; if ((get-folder -Name junk) -eq $false) { echo exist } else {echo "does NOT exist" }
    Get-Folder : 12/06/2009 12:50:13 PM    Get-Folder        Folder with name 'junk' not found, using the specified filter(s).
    
    At line:1 char:16
    + if ((get-folder &lt;&lt;&lt;&lt;  -Name junk) -eq $false) { echo exist } else {echo "does NOT exist" }
        + CategoryInfo          : ObjectNotFound: (:) [Get-Folder], VimException
        + FullyQualifiedErrorId : Core_ContainerCmdletBase_ObjectNotFoundByName,VMware.VimAutomation.Commands.GetFolder
    
    does NOT exist
    

    I had the same thing and used the following text:

    if (get-folder foo -ErrorAction SilentlyContinue) { "it's there" }
     else { "it's not" }
    

    You can learn more about the control of error here: http://blogs.msdn.com/powershell/archive/2006/11/03/erroraction-and-errorvariable.aspx

    Hope this helps

    Alan Renouf

    http://Virtu-al.NET

Maybe you are looking for