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

  • Question

  • 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

    Wednesday, March 7, 2012 5:00 PM

Answers

  • You should place your GlobalValueContainerDefinition model information in the Common.lsml file, not the Client.lsml file.
    Wednesday, March 7, 2012 6:47 PM

All replies

  • You should place your GlobalValueContainerDefinition model information in the Common.lsml file, not the Client.lsml file.
    Wednesday, March 7, 2012 6:47 PM
  • Awesome Matt,

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


    Derek

    Wednesday, March 7, 2012 6:48 PM
  • Thanks for the feedback.  I'll see if we can get that fixed.
    Wednesday, March 7, 2012 6:50 PM
  • One more quick question.  Does it go as an element at the root?

    Derek

    Wednesday, March 7, 2012 6:51 PM
  • 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

    Wednesday, March 7, 2012 6:52 PM
  • 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

    Wednesday, March 7, 2012 7:00 PM
  • 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

    Thursday, August 9, 2012 4:25 PM