locked
Master Detail View - How to add a field from a related table to detail RRS feed

  • Question

  • Just getting started in LightSwitch.  Very cool product!

    Suppose you have a Master / Detail View with the Order Header / Order Detail.

    Each Order Detail has a Qty Product Price but I also want to include the Description from the related Products table.

    Assuming relationship is in place between Order Detail <<---> Product, how does one add a new text box based to pull the description from the related table.  (read only is fine).

    When I click Add, I see the fields in the Order Detail table and options like Add Text, Other Screen Data, New Custom Control etc...  Which do I use,   Do I have to do this with code (e.g. Total = Qty * Price).


    Ed

    Saturday, September 28, 2013 1:39 AM

Answers

  • Hi Ed,

    In screen designer body,

    #1 Click on the parent node of the 'Qty Product' Price to select it.

    #2 Click on [+ Add v] and from the dropdown menu choose 'Other Screen Data...'.

    #3 Use the intellisense to help enter a binding path something like 'Product.Description'

    The full path will be like 'OrderDetails(item).Product.Description'

    Hope it helps

    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.

    Saturday, September 28, 2013 9:29 AM

All replies

  • Hi Ed,

    In screen designer body,

    #1 Click on the parent node of the 'Qty Product' Price to select it.

    #2 Click on [+ Add v] and from the dropdown menu choose 'Other Screen Data...'.

    #3 Use the intellisense to help enter a binding path something like 'Product.Description'

    The full path will be like 'OrderDetails(item).Product.Description'

    Hope it helps

    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.

    Saturday, September 28, 2013 9:29 AM
  • Fantastic.  Thanks

    Ed

    Monday, October 7, 2013 10:34 AM