Wednesday, 18 June 2014

Converting a form to a service and vice versa

I discovered something new and rather interesting yesterday.  And by new, I mean new to me, apparently it's been there "forever"!

I was trying to do some testing for my earlier post on handles, and wanted to run an operation on a mapped server.  However, the operation was on a form, and not a service, which it needs to be to run mapped.  I was just about to create a new service and copy the operation code when I mentioned this off hand in conversation with a colleague of mine, and he mentioned that it was actually very easy to convert a form into a service.

I thought he was about to show me some really clever, well hidden little trick.  Alas, it's right there in the "File" menu, and always has been...

So all you have to do is click that and compile, job done!  You learn something new every day.

Summary: It's really easy to convert a form into a service, or many other things, and vice versa, which you might need to do if you want to run an operation on a mapped server.

Thanks to Mark R for pointing this out for me.


  1. This comment has been removed by the author.

  2. Hi Rick,
    I have been using this functionality for years as a sort of first step modernization for older Uniface systems.
    Be sure to have you runtime environment point at the new service by:
    - deleting the old .frm file
    - deleting the old 'form' signature before compiling the new service
    - update your dol and urr (if you still deploy in 'classic' mode)

    Arjen van Vliet
    Uniface BV