Forms: How to select a file?

Das Goravani goravanis at
Mon Apr 25 21:07:59 UTC 2022

All of these problems that I had: How to select a file, Feeding file save the file name, "readfile" problems…

They are all gone now. They were all solved by the jsFile File Control object. 

When I first encountered that thing I misunderstood it, or it didn’t occur to me that Upload Download was what I was looking for. That’s how the Samples library is billed and coded, as "upload" and "download". It didn’t occur to me that meant "Read files into Omnis" and "out again". But that is what it is. 

So today I implemented it no problem by pretty much copying over the buttons and Find Control Field from their form to mine. Just changed the target list to mine.. maybe added a few lines of code I needed

To actually understand what they are doing is a bit beyond me.. they fire up a few rows and lists in there… that are populated strangely to me.. but I don’t need to understand that stuff in order to use it.. it’s just a few lines of code you leave in, inherited as if

The upload dialog is a bit funky.. there’s a select button, and when you do that it comes back to now an upload button.. after which you are STILL on the dialog and Cancel and Close are both options. But I don’t think you can actually cancel from there at that point. The files are in your own list at this point. Maybe I’m wrong on that. But it’s an unusual dialog experience. But I accept! I’m glad there is a file picker for selecting files to upload to Omnis when working with Forms.

I’ll have to be OK with just having downloads folder as destination. I guess this gives rise to code written later for clients whereby you are checking the downloads folder for specific files that may have arrived. And then moving them from there to right destinations. 

How do you select a file on the Mac or PC, and copy it/upload it to a Linux server? Or vice versa.

Do you select it on the local machine with above File Control, then use HTTP worker object to move the file to or from the server?

Now that I’ve done this IMAP Worker Object Project, my next is the HTTP Worker. 

> On Apr 25, 2022, at 2:38 AM, Paul Mulroney via omnisdev-en <omnisdev-en at> wrote:
> Hi Das,
>> On 24 Apr 2022, at 1:51 am, Das Goravani <goravanis at> wrote:
>> BUT I wish there was a File Picker dialog that I could pop up over the form (good only on desktop/laptop computers).  I haven’t found that yet in the docs for remote forms. I’m glad I found out how to do drag and drop of file system files. 
> There is such a thing - it's the File Control object in the remote form.  You can trigger an upload by putting code that looks like this in a button:
> Calculate irFileData as row(ilMIMEHeaders,'tvFileData')
> Calculate $cinst.$objs.FileControl.$action as kJSFileActionUpload               ## this triggers the file upload
> Look for the File Control object in the online docco - <>
> Regards,
> Paul.
> You can't have everything; where would you put it?
> -- 
> Paul W. Mulroney                                            We Don't Do Simple Pty Ltd 
> pmulroney at       Trading as Logical Developments
>                   ACN 161 009 374 
> Ph: +61 8 9458 3889                                       86 Coolgardie Street
>                                                                         BENTLEY  WA  6102
> _____________________________________________________________
> Manage your list subscriptions at
> Start a new message -> mailto:omnisdev-en at 

More information about the omnisdev-en mailing list