locked
Auto complete box: how to filter the things shown there RRS feed

  • Question

  • I have made a small database for storing the presence of my volleyball team during training. Furthermore I used Lightswitch to insert the data. For the trainings I have a screen showing all the information (date, time, place, ...) and I can add a player to this training and the status, e.g. if she was there, or if her absence was without excuse or not. There is a data grid, where I can add a palyer, her status, ...  I use a auto complete box to choose the right player, then I set her training status a.s.o. But some of the players in the database are not active, so I don't want to see them in the box, when I choose the player. I have a property "active" for that. The question is, how can I achieve, that only the players with "active==TRUE" are shown in this box? Is it possible to filter that somehow.

    Thanks for your help,

    stephan mc


    stephan mc

    Wednesday, June 24, 2015 2:16 PM

Answers

  • Hello

    This should be a fairly simple one to solve. Firstly you will have to create a query on the Player table (maybe call it AcvitePlayers) where Active = true. This link will show you how if you haven't done this before.

    Then, once you have created this query select the autocomplete box on the screen designer and look at the properties of it. It should show that it is using your players table as a data source. In the Choices box you should see Auto but if you now add the newly created ActivePlayers query to your screen you should see that you can change the Auto to ActivePlayers and now your autocomplete box will only show active players.


    If you found this post helpful, please mark it as helpful. If by some chance I answered the question, please mark the question as answered. That way you will help more people like me :)

    • Proposed as answer by Otis Ranger Wednesday, June 24, 2015 2:38 PM
    • Marked as answer by brotfuerst Wednesday, June 24, 2015 6:44 PM
    Wednesday, June 24, 2015 2:38 PM

All replies

  • Hello

    This should be a fairly simple one to solve. Firstly you will have to create a query on the Player table (maybe call it AcvitePlayers) where Active = true. This link will show you how if you haven't done this before.

    Then, once you have created this query select the autocomplete box on the screen designer and look at the properties of it. It should show that it is using your players table as a data source. In the Choices box you should see Auto but if you now add the newly created ActivePlayers query to your screen you should see that you can change the Auto to ActivePlayers and now your autocomplete box will only show active players.


    If you found this post helpful, please mark it as helpful. If by some chance I answered the question, please mark the question as answered. That way you will help more people like me :)

    • Proposed as answer by Otis Ranger Wednesday, June 24, 2015 2:38 PM
    • Marked as answer by brotfuerst Wednesday, June 24, 2015 6:44 PM
    Wednesday, June 24, 2015 2:38 PM
  • Thanks. Perfect solution! And of course quite easy one.

    stephan mc

    Wednesday, June 24, 2015 6:44 PM