1. Louis Arena
  2. PowerServer
  3. Thursday, 6 April 2023 18:31 PM UTC

I recently converted my app to PowerServer.  I am starting to do some performance enhancements and would like to use the startmerge / endmerge when making calls to the SQL server.  Whenever I investigate this I repeatedly see the following link.

https://docs.appeon.com/pb2022/objects_and_controls/PowerServerLabel_object.html

However, this link makes an assumption that someone has setup a global variable of type PowerServerLabel, but no where can I find examples of declaring this variable and setting up the parameters for it.  Does anyone have any example of this?

 

Accepted Answer
Louis Arena Accepted Answer Pending Moderation
  1. Friday, 7 April 2023 13:34 PM UTC
  2. PowerServer
  3. # Permalink

Logan, thanks for the reply.  I actually figured this out but I am confused by some exampled of what I see using this.  Appeon documentation says to use this object as follows.

nvoPowerServer.StartMerge ()

nvoPowerServer.EndMerge ()

However on a video demo i was watching they used functions built within this object, like this

nvoPowerServer.of_StartMerge ()

Why would someone make a function within this object to call the startmerge? Would something different be within that object?

 
Comment
  1. Logan Liu @Appeon
  2. Monday, 10 April 2023 02:02 AM UTC
In my opinion, you can wrap PowerServerLabel in your own NVO, such as nvoPowerServer, so you can add more code there to calculate time cost and write logs to optimize performance. In a nutshell, extending PowerServerLabel is much easier if you create an NVO.
  1. Helpful 2
  1. Louis Arena
  2. Monday, 10 April 2023 13:36 PM UTC
Thank you that makes sense.
  1. Helpful
There are no comments made yet.
Logan Liu @Appeon Accepted Answer Pending Moderation
  1. Friday, 7 April 2023 01:34 AM UTC
  2. PowerServer
  3. # 1

Hi Louis,

PowerServerLabel is a PB system object. You can create it just like other PB objects.

PowerServerLabel is suggested to be declared as a global variable or wrapped in an NVO, so you can reuse it everywhere in your application or extend it in the NVO easily. But you can also only create a local variable for it.

You can declare a global variable:  PowerServerLabel gpsl_your_label_name

Then create its instance before using it: gpsl_your_label_name = Create PowerServerLabel 

You can also refer to the last example of the StartMerge method: StartMerge - - PowerScript Reference (appeon.com)

Regards, Logan

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.