I can't find how to convert my Global parameters to use in queries

Kilitli I can't find how to convert my Global parameters to use in queries

  • 07 Mart 2012 Çarşamba 17:00
     
     

    After porting my app from v1 to v2 the Global properties I was using as parameters in a query are not available.  I went into the Client.lsml and put them in the same posisiton as they were in the ApplicationDefinition.lsml ... but no joy.  I would like to know what we should be doing in this regard.

    Any suggestions?


    Derek

Tüm Yanıtlar

  • 07 Mart 2012 Çarşamba 18:47
     
     Yanıt
    You should place your GlobalValueContainerDefinition model information in the Common.lsml file, not the Client.lsml file.
  • 07 Mart 2012 Çarşamba 18:48
     
     

    Awesome Matt,

    Thanks for the quick reply.  Just an FYI that is not being done in the conversion tool.


    Derek

  • 07 Mart 2012 Çarşamba 18:50
     
     
    Thanks for the feedback.  I'll see if we can get that fixed.
  • 07 Mart 2012 Çarşamba 18:51
     
     
    One more quick question.  Does it go as an element at the root?

    Derek

  • 07 Mart 2012 Çarşamba 18:52
     
     

    Guess it does :)  That works.


    Derek

    No that is not it.  It won't compile there.  The error is:

    Error 11 The type or namespace name 'LightSwitchCommonModule' could not be found in the global namespace (are you missing an assembly reference?) C:\Source Code\Projects 2012\Spursoft\PermitMaster2011\PermitMaster2011\Server\GeneratedArtifacts\DataServiceImplementation.cs 2067 47 Server

  • 07 Mart 2012 Çarşamba 19:00
     
     
    So there is one more step.  In v1 we created a class file which existed in the Application namespace.  Now it resides in the LightSwitchCommonModule namespace so change the Namespace in the class file and if you are querying the Application for anything in that class or static function you need to add the LightSwitchApplication namespace to your usings.

    Derek

  • 09 Ağustos 2012 Perşembe 16:25
     
     

    I had trouble with GlobalVariables after upgrade as well.  Looks like the GlobalValueContainerDefinition model information was placed in the Common.lsml during upgrade.  Thanks LS Team for that!  

    All I had to do was change the Namespace in the class file to LightSwitchCommonModule and add imports LightSwitchApplication.  Thanks Derek! 

    Josh