This discussion is archived
1 Reply Latest reply: Feb 18, 2013 2:00 AM by Deepu M RSS

Get parent databank in a child scipt

Deepu M Journeyer
Currently Being Moderated
Hi All,

Is there any method to get parent databank in a child script. Currently I'm using variables to pass data from parent script to child script.
Appreciate if anyone helps me to solve this scenario.

Regards,
Deepu M
  • 1. Re: Get parent databank in a child scipt
    Deepu M Journeyer
    Currently Being Moderated
    Hi,

    Solved.


    If alias name of parent databank always remains same, then you can directly use +"{{db.aliasName.ColumnName}}"+

    Otherwise, to get parent databank alias name use

    ScriptPackage parentScript= utilities.getCurrentVUSer().getParentUser().scriptPackage;
              ArrayList<String> parentDB = parentScript.getDatabankAliases();
    +info(eval("{{db."+ parentDB.get(0) + ".ColumnHeader}}"));+

    Regards,
    *Deepu M*

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points