locked
Select or Add Related Record RRS feed

  • Question

  • Hi all, fairly new to LightSwitch and looking for some guidance on a reasonably basic scenario.

    When adding a record, how do i code a screen that allows the user to select or add a related record?  The app is a fairly simple contact log that records external communications with the office.  When adding a new caller, we want to populate the caller's Organisation from a drop down list or if that organisation hasn't been added, provide a form to add new details. A control(?) consisting of a drop down and a 'plus' button would be ideal. 

    What is the best way to try to create this functionality?

    cheers & tia

    Edit:  Oops, sorry.  VS2012, desktop (2-tier) application.
    • Edited by nob0dy Tuesday, April 1, 2014 8:48 AM
    Tuesday, April 1, 2014 7:09 AM

All replies

  • You did not say which version or client you are using.

    If it is HTML client then there is a very nice tutorial and sample on Paul van Bladel's site.

    Ergonomically Re-Using search screen in the Lightswitch html client part 1/2

    I like that pattern.

    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.

    • Marked as answer by Angie Xu Tuesday, April 8, 2014 6:20 AM
    • Unmarked as answer by nob0dy Thursday, April 24, 2014 6:20 AM
    Tuesday, April 1, 2014 8:09 AM
  • The referenced web page provides an excellent description of *what* I want to achieve, but does not say *how*.

    So far no code, only exploration of the scenario. I hope you noticed that we really want to make things ergonomic combined with re-using screens (in this case the browse customer screen).

    In a next article, you’ll see we can do this with very few code !

    There is no next article (at least not that I could see - certainly nothing called '... part 2/2').

    I will try to write this question better in a new thread.

    Thursday, April 24, 2014 6:50 AM
  • Paul's article is quite straightforward and as he says there will be little code. Most of the plumbing is intrinsic, Paul is using standard LightSwitch as much as possible. I'm out of time this week to detail further but hang in there, someone will help.

    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.

    Thursday, April 24, 2014 9:00 AM