Forum Replies Created

Page 13 of 14
  • Andreas Pfeiffer

    Administrator
    December 2, 2022 at 12:05 pm in reply to: $sessionPools

    Hello Franco,

    If using a session pool you can use a public method to determine the port and database name. The 6th argument of the $makepool method takes the name of the method which will be called for every session in the session pool.

    This method will then have a parameter of type item reference which points to the new session and you can then set its $port and any other session property.

    However nowadays I would not recommend using session pools because creating a new session to a database is very quick and does not take much time. So if you do a logon in the $construct of your remote task using a task variable you will have a session object as a task variable that can then be used whenever you need it to talk to the database. Since the task is encapsulated for every user it is save to do so. For example I have a $logon method in the remote task that is called from its $construct like this (tSessionObj is a task variable of type object, you can assign the subtype if you do not need to set this dynamically):

    # logon to PostgreSQL DB

    Do $extobjects.PGSQLDAM.$objects.PGSQLSESS.$new() Returns tSessionObj

    Do tSessionObj.$port.$assign(iniObj.$getSectionParam(‘DB’,’PORT’))

    Do tSessionObj.$database.$assign(iniObj.$getSectionParam(‘DB’,’DATABASE’))

    Do tSessionObj.$schema.$assign(iniObj.$getSectionParam(‘DB’,’SCHEMA’))

    Do tSessionObj.$logon(iniObj.$getSectionParam(‘DB’,’HOST’),iniObj.$getSectionParam(‘DB’,’USER’,iniObj),iniObj.$getSectionParam(‘DB’,’PASSWORD’)) Returns ok

    Quit method ok

    Note: the iniObj returns information from a text file.

    So in the $construct of your super table class you would do something like this:

    Do $cinst.$sessionobject.$assign(tSessionObj)

    Hope this helps.

    Best,

    Andreas 😀

  • Andreas Pfeiffer

    Administrator
    October 25, 2022 at 1:37 pm in reply to: Omnis Data Bridge Client-side connection management

    Hi Kon,

    I would not recommend running the ODB server on a laptop machine for exactly this reason. As it is a server it supposed to stay available for the clients.

    I hope this helps.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    October 24, 2022 at 2:25 pm in reply to: Omnis Data Bridge Client-side connection management

    Hello Kon,

    what Omnis version and what ODB version are you using?

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    September 30, 2022 at 11:19 am in reply to: Payload in $listen

    Franco,

    No worries. You have this documented here: https://www.omnis.net/developers/resources/onlinedocs/index.jsp?detail=Programming/09serv.html#notification-channels

    Have a great day!

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    September 30, 2022 at 6:55 am in reply to: Payload in $listen

    Hello Franco,

    Did you declare a parameter of type row in the $notify method? It should then have the payload as one of the values within that row.

    I hope this helps,

    Best regards,

    Andreas

  • Andreas Pfeiffer

    Administrator
    September 9, 2022 at 8:03 am in reply to: Toast Messages

    Hi Silvan,

    ok – I did not know that you are working on fat client windows. Sorry.

    You may want to use a timer object to achieve this. I would personally not use a toast message for this rather some kind of animation. There is also a sample app for this.

    Hope this helps.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    September 9, 2022 at 7:44 am in reply to: Toast Messages

    .. and finally you can have another toast message in your loadList method that will come last.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    September 9, 2022 at 7:38 am in reply to: Toast Messages

    Hi Silvan,

    Now I understand your requirement.

    This is something that you can achieve using an overlay. There is a sample library “JS Loading Overlay” in the samples section of your HUB.

    You can also achieve this using a toast message if you want:

    1. Put your code that loads the data into another method (not the $event method that you use to load the data)

    2. Make the $event method of your button that is used to load the data “client executed”. You can do this using the context menu onto the method name.

    3. Then the first line in your $event method after the on evClick will be to start the toast message. After that you would then call your server side method using the “Do method” command.

    I.E.

    On evClick

    Do $cinst.$clientcommand(‘showtoast’;row(‘loading’))

    Do method loadList

    So, since the $event method will now be executed on the client the toast message will appear first and then the data will be loaded on the Omnis server.

    I hope this makes sense.

    Best regards,

    Andreas

  • Andreas Pfeiffer

    Administrator
    September 9, 2022 at 6:47 am in reply to: Toast Messages

    Hello Silvan,

    The reason why this happens might be that you run the code server side. Omnis automatically synchronises all instance variables in that instance with the client (browser). In that moment it will also send any client command to the browser. So in a way you would need to think asynchronously when it come to communication with the client.

    What is the reason you want any other code after your message? Maybe I can help you finding a different approach to achieve what you want?

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    July 27, 2022 at 4:10 pm in reply to: Administrators please check this

    Hi Scotte,

    Thanks for letting us know. I have deleted this user from this forum. We are currently about to clean this up.

    Thanks again.

    Best regards,

    Andreas

  • Andreas Pfeiffer

    Administrator
    July 27, 2022 at 10:09 am in reply to: oAuth2

    Hi Mike,

    Did you see there is a sample app in the sample section of the HUB. Search for SMTP OW3 worker.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    June 22, 2022 at 9:23 am in reply to: Desktop client – $allowcopy for Masked Entry Field

    Maybe you can use a page pane object that switches between a normal entry field which is disabled and allows copy and a masked entry field when you allow to enter the data?

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    June 22, 2022 at 9:17 am in reply to: Desktop client – $allowcopy for Masked Entry Field

    Sorry, just saw that you are asking for the masked entry field. I miss-read your question.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    June 22, 2022 at 9:15 am in reply to: Desktop client – $allowcopy for Masked Entry Field

    Hi Giacomo,

    As far as I can see there is a $allowcopy property for multiline entry fields in Omnis Studio 10.2.

    Best,

    Andreas

  • Andreas Pfeiffer

    Administrator
    June 10, 2022 at 9:22 am in reply to: Working-environment Omnis studio

    Alternatively there is a “Fonts” item in the menu that pops up when you click on “view” in the toolbar. You can also change your font size there.

    Best,

    Andreas

Page 13 of 14