locked
How do I create dropdown based on the data from other tables? RRS feed

  • Question

  • Hello Lightswitch Experts,

    VS 2013

    SQL server 2012

    I created simple editable screen where it has the following details.

    Salesdata [ product name, owner , customer , income, comments ] 

    I want to have a drop down for Product name, owner , customer columns where the data is from other 3 different existing tables

    from another database in SQL server.

    Can someone help me how can I do this/Point me to the documentation?


    Friday, February 27, 2015 9:49 PM

All replies

  • HI shiningstar1,

    Welcome to Lightswitch forum.

    According to your description above, you want to connect to SQL data source, you can use the Attach Data Source Wizard to do that.

        • In Solution Explorer, click the Data Sources node.
        • On the Project menu, click Add Data Source.

          The Attach Data Source Wizard appears.

        • In the Choose a data Source Type page, click Database, and then click Next.

        • If the Choose Data Source dialog box appears, click Microsoft SQL Server, and then click OK.

        • In the Connection Properties dialog box, make sure that Microsoft SQL Server (SqlClient) appears as selected in the Data source box.  Further information: Connect to Data

  • Best regards,

  • Angie


  • We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

Monday, March 2, 2015 6:23 AM
  • Once you have the other database connected to LightSwitch see if this post helps: Lookups

    That shows how to use drop down data from physically unrelated tables.

    Cheers

    Dave


    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.

    Monday, March 2, 2015 12:38 PM