This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

SOLUTION - PROGRAM MANAGEMENT - Problem in Fetching value from SQL

AbhishekSrivastava - Friday, March 25, 2016 1:52 AM:

Dear Friends,

I want to fetch value from sql Customer Table, like if i select Customer Name then Customer Segment Automatic fetch.

Test Item Type

Customer Name is list data type, property name is "name"

Customer Segment is String Data type, Property name is "customer_segment"

Customer Item Type

Name is String Data Type , Property name is "name"

Customer Segment is string Data type, Property name is "customer_segment"

Database name is "TESTDB"

So i have written a javascript code but this didn;t work .

function selectColumn()
{
    var pleaseWork = selectColumn("SELECT  [CUSTOMER_SEGMENT] FROM [TESTDB].[innovator].[CUSTOMER] WHERE [NAME] = ' "+name+" ' " );
    handleItemChange("customer_segment", pleaseWork);
    console.log(pleaseWork);
}

Kindly request to guide if anyone have solution.

I need when i select value from dropdown then on customer segment value fetch from DB in Test Item Type

 

Thank You

Abhishek Srivastava



AbhishekSrivastava - Friday, March 25, 2016 3:03 AM:

function selectColumn()
{
    var CustName =document.thisItem.getProperty("name");
    var customer_segment=document.thisItem.getProperty("customer_segment");
    var pleaseWork = selectColumn("SELECT  [CUSTOMER_SEGMENT] FROM [MIND].[innovator].[CUSTOMER] WHERE [NAME] = ' "+CustName+" ' " );
    handleItemChange("customer_segment", pleaseWork);
    console.log(pleaseWork);
}