Extract data source value using javascript

chinnappa_rajuchinnappa_raju Posts: 4

I need to extract value of datasource column using Javascript and combine it with other values. I see some examples of Jython in the forum. Can't we achieve this using Javascript in SOATest?

Comments

  • benken_parasoftbenken_parasoft Posts: 294 ✭✭✭
    edited June 16
    function doSomething(input, context) {
       someValue = context.getValue("dataSourceName", "columnName")
    }
    

    Also see "Parasoft SOAtest User's Guide > Reference > Extensibility (Scripting) Basics"

  • chinnappa_rajuchinnappa_raju Posts: 4

    Thanks, that worked for a datasource, but not working for a Generated Data Source like a value from Text Data Bank. I need to concatenate values from data source and random generated value - from text data bank

  • benken_parasoftbenken_parasoft Posts: 294 ✭✭✭

    Use "Generated Data Source" for the data source name, the first argument in that method call. The second argument would be the data bank column name.

  • chinnappa_rajuchinnappa_raju Posts: 4

    tried that, it doesnt work

  • OmarROmarR Posts: 163 admin

    Hello Chinnappa,

    Would you kindly give us your current progress/ script so that we may evaluate it? :)

Sign In or Register to comment.