Topic
  • 8 replies
  • Latest Post - ‏2013-09-24T00:42:17Z by TonyNGAN
TonyNGAN
TonyNGAN
34 Posts

Pinned topic Get Datapool Name

‏2013-09-18T08:08:06Z |

Dear All,

I'm writing a script to run some login steps.

Due to some reason, I need to save the data in 5 different datapool.

So that I will associate the datapool with the script each time.

But I am wondering if there have any script can get the current datapool name?

For example when I using "Datapool_1", a script System.out.println() can return "Datapool_1" for me.

Many Thanks!

Tony

  • cagin.uludamar
    cagin.uludamar
    66 Posts
    ACCEPTED ANSWER

    Re: Get Datapool Name

    ‏2013-09-23T05:21:56Z  
    • TonyNGAN
    • ‏2013-09-23T03:56:38Z

    Hi Krisz,

    I've tried this.

    IDatapool s = getDatapool();

    s.getName();

    By all I've got is "Datapool@9ZWEXX"

    Seems it just return the ID :(...

    Thanks & Regards

    Tony

    Tony I think the simplest solution is to bury datapool name as a separate field in the datapool. 

  • cagin.uludamar
    cagin.uludamar
    66 Posts

    Re: Get Datapool Name

    ‏2013-09-18T10:35:44Z  

    Hi, try getDatapool().getName()

  • TonyNGAN
    TonyNGAN
    34 Posts

    Re: Get Datapool Name

    ‏2013-09-19T01:04:19Z  

    Hi, try getDatapool().getName()

    Hi Cagin,

    I've tried this one but the system will return "null"

    Many Thanks

    Tony

  • cagin.uludamar
    cagin.uludamar
    66 Posts

    Re: Get Datapool Name

    ‏2013-09-19T05:55:56Z  
    • TonyNGAN
    • ‏2013-09-19T01:04:19Z

    Hi Cagin,

    I've tried this one but the system will return "null"

    Many Thanks

    Tony

    You're right Tony, it must be an RFT bug.

    I couldn't find any other way of doing this. Can you explain further why you need this? You can see the associated datapool in Script View, if your aim is to decide which datapool to associate next.

  • ChrisGF
    ChrisGF
    192 Posts

    Re: Get Datapool Name

    ‏2013-09-19T08:53:27Z  

    take a look in the

    IDatapool s = getDatapool();

    you wil find a name, value: loadFile, File

    you might try to dig out the value....

  • TonyNGAN
    TonyNGAN
    34 Posts

    Re: Get Datapool Name

    ‏2013-09-23T03:45:58Z  

    You're right Tony, it must be an RFT bug.

    I couldn't find any other way of doing this. Can you explain further why you need this? You can see the associated datapool in Script View, if your aim is to decide which datapool to associate next.

    Hi Cagin,

    Thank you :)!

    The reason I need to dig out the datapool name is because the script will run with 5 different datapool each time.

    Also, the script is not only run by myself only, my colleagues will also use this script. 

    When the script hits any errors, it will send out a warring email to notify my team which datapool's record is incorrect.

    So that I want to have the datapool name:)

    Thanks & Regards

    Tony

    Updated on 2013-09-23T03:58:02Z at 2013-09-23T03:58:02Z by TonyNGAN
  • TonyNGAN
    TonyNGAN
    34 Posts

    Re: Get Datapool Name

    ‏2013-09-23T03:56:38Z  
    • ChrisGF
    • ‏2013-09-19T08:53:27Z

    take a look in the

    IDatapool s = getDatapool();

    you wil find a name, value: loadFile, File

    you might try to dig out the value....

    Hi Krisz,

    I've tried this.

    IDatapool s = getDatapool();

    s.getName();

    By all I've got is "Datapool@9ZWEXX"

    Seems it just return the ID :(...

    Thanks & Regards

    Tony

    Updated on 2013-09-23T03:56:58Z at 2013-09-23T03:56:58Z by TonyNGAN
  • cagin.uludamar
    cagin.uludamar
    66 Posts

    Re: Get Datapool Name

    ‏2013-09-23T05:21:56Z  
    • TonyNGAN
    • ‏2013-09-23T03:56:38Z

    Hi Krisz,

    I've tried this.

    IDatapool s = getDatapool();

    s.getName();

    By all I've got is "Datapool@9ZWEXX"

    Seems it just return the ID :(...

    Thanks & Regards

    Tony

    Tony I think the simplest solution is to bury datapool name as a separate field in the datapool. 

  • TonyNGAN
    TonyNGAN
    34 Posts

    Re: Get Datapool Name

    ‏2013-09-24T00:42:17Z  

    Tony I think the simplest solution is to bury datapool name as a separate field in the datapool. 

    Hi Cagin,

    Agree with you. Cause no matter how i try to retrieve it, those information return is not suitable for me.

    Thus, I may use the simplest solution as you mentioned :)~ Add a new field and get that field data 

    Thanks again!

    Regards

    Tony

    Updated on 2013-09-24T00:42:51Z at 2013-09-24T00:42:51Z by TonyNGAN