locked
Lightswitch HTML Client - Support Request RRS feed

  • Question

  • Hello!

    I will be concise and possible and I thank you in advance for any assistance. Keep in mind I am not a developer and am learning about HTML/Lightswitch as I go. I am interested in articles to learn how to achieve the following:

    Request 1: In the HTML client, I have a 'Browse Screen'. It is called BrowseDevices. It is linked to an SQL entity called Devices. 

    I added a Search parameter to this screen, and the screen displays a Search bar and a list of the Summary Property items from the Device table. I can search for a Device, find the device, and then select the Device. At that point a command         'banner' appears and allows me to View or Edit the Device I searched for and selected.

    My question is: How can I instead control navigation so that simply clicking the Device from the list will display the ViewDevice screen? Selecting 'View' after choosing the Device seems an extra step. I would like to click on an item from my Device list, and automatically be taken to its View screen, where I will place the Edit button.

    Request 2: Is it possible to Sort a list from a Related Table in an Edit screen? For instance, when I Add or Edit a Device, there are non-null related tables that are represented by drop-down menu's in the Edit shell. These lists are displayed in the order they are entered in the SQL table - they are not ascending in that table. If I could sort them, it would be much more efficient.

    If a sort if not possible, is it possible to add a text field to the drop-down menu, so I could type the first letters a scroll to that letter in the list?

    Request 3: Is it possible to re-position the HTML command 'banner'? It is always positioned at the bottom with the action buttons in the lower-left corner. This is the furthest position from the Search box on the screen. Can it be made to stay static at the top of the page instead, ideally with the action buttons in the top right? Thank you so much!!

    Friday, October 30, 2015 3:26 PM

Answers

All replies

  • Update: I have fixed the first issue. Changing the list's Tap Action to viewSelected worked. ;).

    Re-positioning the command banner is the next priority.


    • Edited by CreedCor Friday, October 30, 2015 4:10 PM
    Friday, October 30, 2015 3:56 PM
  • Request 3: Is it possible to re-position the HTML command 'banner'? It is always positioned at the bottom with the action buttons in the lower-left corner. This is the furthest position from the Search box on the screen. Can it be made to stay static at the top of the page instead, ideally with the action buttons in the top right? Thank you so much!!

    I think you will find that on smaller devices, the banner needs to be on the bottom to be workable. I would just make buttons at the top if needed. See: Walk-thru Examples of Common Visual Studio LightSwitch JavaScript for examples.


    Unleash the Power - Get the LightSwitch HTML Client / SharePoint book

    http://LightSwitchHelpWebsite.com

    • Marked as answer by CreedCor Monday, November 9, 2015 10:24 PM
    Saturday, October 31, 2015 1:21 PM
  • For the second request, you can add another query to the edit screen and sort that query by whatever criteria you want. You then select the drop down control and in the properties for that control, select that new query as the source, rather than the default 'Auto' source.

    Regards, Xander. My Blog


    • Edited by novascape Saturday, October 31, 2015 10:58 PM
    Saturday, October 31, 2015 10:58 PM
  • Great and simple suggestion, thank you!

    With buttons in place, I presumably do not need the banner at all. Can it be disabled?

    Wednesday, November 4, 2015 7:05 PM
  • Thank you for the response. I will look into this solution.

    Right now, I am not 100% on what you mean, conceptually, but I will follow through with your suggestion and see how it goes.

    Thanks again!

    Wednesday, November 4, 2015 7:07 PM
  • Great and simple suggestion, thank you!

    With buttons in place, I presumably do not need the banner at all. Can it be disabled?

    I worked this out. Thank you.
    Wednesday, November 4, 2015 7:11 PM
  • Request 3: Is it possible to re-position the HTML command 'banner'? It is always positioned at the bottom with the action buttons in the lower-left corner. This is the furthest position from the Search box on the screen. Can it be made to stay static at the top of the page instead, ideally with the action buttons in the top right? Thank you so much!!

    I think you will find that on smaller devices, the banner needs to be on the bottom to be 

    Hello!

    While I hope I have your attention... I am having a JS runtime error that occurs when I hit 'enter' in my Browse Screen search box.

    The box displays on the screen. The table I am attempting to search is an external data source, an SQL database. The data in that table is displayed on the Browse screen in ascending order. I can view and add items to the database as well.

    The problem is with searching for and/or deleting items. Right now I will focus on the search...

    When I am on the Browse Screen and I put a Str value in the search box, it is fine until I hit enter. When I do, I get the following runtime error:

    "Unhandled exception at line 14961, column 17 in http://localhost:2009/HTMLClient/Scripts/msls-1.0.0.js

    Javascript runtime error: Unable to get property 'type' of undefined or null reference."

    The line in the script is: "if (e.originalEvent.type !=="click") {

    I do not know where to go from there. I have disabled LS extensions and really do not know what is causing this error. Please advise.

    Thank you!!!!

    Wednesday, November 4, 2015 7:58 PM