locked
Set Query Parameter In Select Event RRS feed

  • Question

  • Using HTML Client

    A Tile List has an Item Tap event.

    I want to set a query parameter of a second query using the selected item in the tile list.

    Basically I have two queries that have a 1 to 1 relationship. The primary key of the selected item is to be used to select the record in the second query.

    The only parameter passed to me in the Item Tap event is the screen object.

    I need the Javascript syntax to get at the selected item's key field.

    I've created an local property data item to hold the second query's parameter. If I set that property to the correct value, it should find the related record in the second table.

    In other words I want the selection to cause the second query to do a related lookup.


    Thomas H. Lanier

    Monday, June 17, 2013 10:18 PM

Answers

  • It turns out the solution is to assign a Parameter Binding value to the Query Parameter of the second query pointing to the primary query's key field. No Javascript was required after all.

    Thomas H. Lanier

    • Marked as answer by tlanier Tuesday, June 18, 2013 12:53 PM
    Tuesday, June 18, 2013 12:57 AM

All replies

  • It turns out the solution is to assign a Parameter Binding value to the Query Parameter of the second query pointing to the primary query's key field. No Javascript was required after all.

    Thomas H. Lanier

    • Marked as answer by tlanier Tuesday, June 18, 2013 12:53 PM
    Tuesday, June 18, 2013 12:57 AM
  • Hi,

    I am very glad that you have solved your problem by yourself.

    If you have any other problem, welcome to post it to the Visual Studio LightSwitch Forums.

    Best Regards.


    Amy Peng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, June 26, 2013 10:20 AM
    Moderator