locked
Add Data Item dialog - Local Property dropdown does not show any Entity types RRS feed

  • Question

  • I'm trying to add some custom filtering to a screen and need to add an AutoCompleteBox for a particular value (a lookup table) and I know how I should do it - I should add a local property of that type of entity to the screen. However the Type dropdown list on the Add Data Item dialog does not show any Entities. It only shows intrinsic types (Integer, String, Date, Image, etc) and Table types.

    Thus, in the Local Property Type list, I see "StreamlineData.Supplier (Table)" which I would use to give me a grid or a list of suppliers on my screen but not "StreamlineData.Supplier (Entity)" which would allow me to have an AutoCompleteBox in which to select a single supplier.

    I suspect a corruption in the LSML file for the application but don't know where to look. The application runs OK but I can't get past this problem to extend the application as I need to.

    Has anyone else seen this problem and knows how to fix it?


    Simon Jones
    If you found this post helpful, please "Vote as Helpful". If it actually answered your question, please remember to "Mark as Answer". This will help other people find answers to their problems more quickly.

    Thursday, October 25, 2012 9:33 AM

Answers

  • After a day tearing my hair out I've fixed the problem(s).

    I repaired Visual Studio 2010, LightSwitch 2011 and Visual Studio 2012 - restarting my PC between times.

    I also experimented with seven new projects in LightSwitch 2011 and VS 2012 to determine the following. THE DOCUMENTATION AND EXAMPLE VIDEOS ARE WRONG!

    You only see "EntityName (Entity)" in the Local Property Type drop down list if you are using an Intrinsic data source. If you are using an External data source the d*mn thing says "DataSourceName.EntityName (Table)"!

    Arrrgh!

    There may well have been a corruption in my project's LSML file or a problem in LightSwitch which caused the Screen Property to become a Grid or List control when added to the control tree instead of an AutoCompleteBox BUT I was looking at a completely different symptom - a completely spurious difference between intrinsic and external data sources and thinking this was related to my main problem when it wasn't.

    Arrrrgh Again!


    Simon Jones
    If you found this post helpful, please "Vote as Helpful". If it actually answered your question, please remember to "Mark as Answer". This will help other people find answers to their problems more quickly.

    Thursday, October 25, 2012 5:06 PM

All replies

  • Has anyone got any ideas? I've run right out of them.

    If it helps, this project is still in LightSwitch 2011. We've not been able to move it up to VS 2012 yet but that's another story.

    The application compiles and runs fine. There are no warnings or messages, let alone errors when compiling. I've Cleaned and Rebuilt the solution, restarted my PC and tried repairing LightSwitch all to no avail.

    It is a large project and I really don't want to have to go backwards through the versions in the source control system to try to find one that works and then have to redo all the changes.


    Simon Jones
    If you found this post helpful, please "Vote as Helpful". If it actually answered your question, please remember to "Mark as Answer". This will help other people find answers to their problems more quickly.

    Thursday, October 25, 2012 3:13 PM
  • After a day tearing my hair out I've fixed the problem(s).

    I repaired Visual Studio 2010, LightSwitch 2011 and Visual Studio 2012 - restarting my PC between times.

    I also experimented with seven new projects in LightSwitch 2011 and VS 2012 to determine the following. THE DOCUMENTATION AND EXAMPLE VIDEOS ARE WRONG!

    You only see "EntityName (Entity)" in the Local Property Type drop down list if you are using an Intrinsic data source. If you are using an External data source the d*mn thing says "DataSourceName.EntityName (Table)"!

    Arrrgh!

    There may well have been a corruption in my project's LSML file or a problem in LightSwitch which caused the Screen Property to become a Grid or List control when added to the control tree instead of an AutoCompleteBox BUT I was looking at a completely different symptom - a completely spurious difference between intrinsic and external data sources and thinking this was related to my main problem when it wasn't.

    Arrrrgh Again!


    Simon Jones
    If you found this post helpful, please "Vote as Helpful". If it actually answered your question, please remember to "Mark as Answer". This will help other people find answers to their problems more quickly.

    Thursday, October 25, 2012 5:06 PM
  • Yes, that's correct, & has always been that way. The documentation/videos are NOT incorrect if they're using an intrinsic database.

    I would have mentioned it, but because you wrote "StreamlineData.Supplier (Table)", I thought you already knew. I also assumed you would have looked down the entire list (which is what I did to find the one I was looking for the first time I used an external data source).


    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    If you find a reply helpful, please click "Vote as Helpful", if a reply answers your question, please click "Mark as Answer"
     
    By doing this you'll help people find answers faster.

    Friday, October 26, 2012 12:27 AM
    Moderator
  • Documentation is incorrect if it doesn't mention, at all, the different behaviour when using intrinsic and external data.

    But why is there a difference at all? There shouldn't be. You are not getting a Table (a collection of entities) you are getting a single Entity!

    Two faults together have wasted a day and a half. If one fault, the documentation, had not existed - just a little more care needed in its preparation, I could have saved all that time.


    Simon Jones
    If you found this post helpful, please "Vote as Helpful". If it actually answered your question, please remember to "Mark as Answer". This will help other people find answers to their problems more quickly.

    Friday, October 26, 2012 7:05 AM
  • Sorry, I disagree, documentation is not "incorrect" if it doesn't mention a particular thing. It could be called "incomplete", but no documentation has absolutely every possibility in it, & therefore could also be called "incomplete".

    If you had simply looked further down the list (which is what I did when I couldn't see what I was looking for the first time), you would have erasily found what you were looking for.

    And the reason it's this way is because ApplicationData.SomeEntity is not the same as YourDataSource.SomeEntity (all they've done is drop the ApplicationData so as not to confuse newbies). If it wasn't this way, how would you be able to distinguish between the entities with the same name, but from a different data source.

    I can understand you being frustrated at wasting time finding what you were looking for, but this one was common sesne really. It's not fair to blame the documentation (this time).


    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    Please click "Mark as Answer" if a reply answers your question. Please click "Vote as Helpful" , if you find a reply helpful.
     
    By doing this you'll help others to find answers faster.

    Friday, October 26, 2012 3:14 PM
    Moderator
  • Incomplete is just another name for incorrect. Stop splitting hairs.

    Being told to look for "EntityName (Entity)" and finding "DataSourceName.EntityName (Table)", of course I tried the "(Table)" option but it didn't work. As I said earlier, there was a bug in my installation of LightSwitch or a corruption in the LSML file - I don't know which - which meant that dragging the resultant Screen Property to the Control Tree gave a GRID not an AutoCompleteBox and no amount of jiggling could make it change to an AutoCompleteBox.

    I then tried to find out why I saw "(Table)" and not "(Entity)" and could find nothing about it.

    I had to repair & reboot three times and spend hours experimenting to find that "(Table)" and "(Entity)" are here used to mean the same thing and are different for no good reason!

    I don't know what proportion of LightSwitch Applications that are built are using Intrinsic or External databases but I bet a great proportion of them are External and therefore the documentation is WRONG.

    Alternatively, if you like, LightSwitch is at fault for putting "(Table)" instead of "(Entity)" - the difference may seem cosmetic to you but IT DOES NOT MEAN THE SAME THING. The database equivalent of an Entity is a Row and a Table equates to a Collection of Entities.

    Now, if you have something constructive to contribute I'd be happy to hear it otherwise I think we'd better draw a veil over this debacle before I get even more annoyed.


    Simon Jones
    If you found this post helpful, please "Vote as Helpful". If it actually answered your question, please remember to "Mark as Answer". This will help other people find answers to their problems more quickly.

    Friday, October 26, 2012 4:00 PM
  • "Now, if you have something constructive to contribute I'd be happy to hear it otherwise I think we'd better draw a veil over this debacle before I get even more annoyed"

    First of all, I contributed several constructive things to the discussion.

    1. I answered your question about why the combox box list is the way it is (even though I see you still don't accept that).
    2. I pointed out why "incorrect"  is NOT the same as "incomplete" (as an editor I would expect that you of all people would know that). It is NOT splitting hairs at all.
    3. I explained how I was able to find the entity name for a screen property, by simply looking further down the list, when I couldn't find it where I (& you) expected it to be.

    And I'll add this:

    1. Table & Entity are in fact used interchangeably in LightSwitch, so "IT DOES NOT MEAN THE SAME THING" is not correct either. And you accuse *me* of splitting hairs.
    2. The majority of applications, I believe, will in fact be using the intrinsic database, using an attached data source is somewhat of an "advanced sceanrio".
    3. When you drag a screen property that was added as a "Query" to the control tree will give you a DataGrid, not an AutoCompleteBox. Dragging a screen property that was added as a "Local property" to the control tree will give you an ACB. They are not interchangeable.

    I really don't appreciate your tone, nor your personal attack, when all I was trying to do is answer your question, & point out something you stated that was incorrect. I also don't appreciate you trying to bully me into agreeing with you. So forgive me if I don't care if you get more annoyed, or not. If you state something that I know is not correct, I'll always point that out. People are here to ask questions, & I'm here to try to answer them.

    I'll state it again, that I understand that the amount of time you wasted is frustrating you, but you can't just change the facts because of your frustration level.

    If you want to dispute this any more, please feel free to email me personally at yann at live dot com dot au.


    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    Please click "Mark as Answer" if a reply answers your question. Please click "Vote as Helpful" , if you find a reply helpful.
     
    By doing this you'll help others to find answers faster.

    Saturday, October 27, 2012 5:56 AM
    Moderator
  • Hi Simon 

    I am experiencing he exact same issue (external data source also), I dont unduerstand what ou did to solve the problem, are you saying that it is not possible to have local property  "DataSourceName.EntityName (Entity)" ?

    If yes how do you solved the problem ?

    Thx

    Axel

     

    Tuesday, February 19, 2013 4:30 PM
  • There is no problem. All Simon had to do was look further down the list to find what he was looking for.

    You certainly can add a local property of type DataSourceName.EntityName, but the option to select it will have (Table) at the end, not (Entity). As I stated earlier, "table" & "entity" are often used interchangeably.


    Yann - LightSwitch Central - Click here for FREE Themes, Controls, Types and Commands
     
    Please click "Mark as Answer" if a reply answers your question. Please click "Vote as Helpful" , if you find a reply helpful.
     
    By doing this you'll help others to find answers faster.

    • Proposed as answer by Axel.C Thursday, February 21, 2013 1:04 PM
    Wednesday, February 20, 2013 12:41 AM
    Moderator