Passing Parameters to Subforms

Martin Obongita martin.obongita at yahoo.com
Wed Jul 20 17:00:03 UTC 2022


Thanks Das.I see what you mean.It does look like a lazy way of passing parameters between main and sub forms.
Martin.

Sent from Yahoo Mail on Android 
 
  On Wed, 20 Jul 2022 at 19:53, Das Goravani<goravanis at gmail.com> wrote:   
Dear Martin,

I thought I answered this but it’s not showing in my email so I’ll answer now.

Task variables are always available to the remote forms. That is, task variables declared inside the remote task you use for your forms.

As such, if you pack them with values while in one form, and then you go to a sub form or another form, you can access the task variables and they will still have the values in them that you assigned in the original form. You can then simply access them.

For example, in your original form, you

Calculate myTaskVar as MyInstanceVar or whatever…

And then in your sub form you

Calculate myInstanceVar as myTaskVar

So the value gets moved from the original form to the task form.

They work all over the place.

I for example, capture on a form whether or not they want to save a generated PDF report… and then in the Remote Task there is $pdfcomplete which is called when a PDF completes. There I access the task var that I packed with the "Save Value" (boolean) when they clicked Print Report… so I can access this task var there and it is still packed with the value I put in it.

So task var’s are good for holding any values that you might want to access from other places. 

They exist outside any one form, they float in the ether of the domain of the remote task that is operating.

I think you know all this, but it doesn’t hurt to go over it.

Thanks

Das Goravani



> On Jul 19, 2022, at 4:29 PM, Martin Obongita via omnisdev-en <omnisdev-en at lists.omnis-dev.com> wrote:
> 
> Hi Das,
> How do task variables work between a main form and a sub form, so that I could use them instead of passing parameters to and from?Especially in a case where I am LOOPing through a list of emails with attachments and sending each.
> Rgds,Martin.
> 
>    On Tuesday, July 19, 2022 at 05:56:16 PM GMT+3, Das Goravani <goravanis at gmail.com> wrote:  
> 
> 
> Yes I too would like a way to pass subforms parameters. There is a Parameters property for the subform but it won’t take what I put in it. 
> 
> To get around this I am simply packing task variables which I then access from the subform.
> 
> But parameters would be nice. 
> 
> 
> 
>> On Jul 18, 2022, at 4:25 PM, Martin Obongita via omnisdev-en <omnisdev-en at lists.omnis-dev.com> wrote:
>> 
>> Hi All,
>> I have a similar problem.
>> I instantiate a subform with the command:
>> 
>> 
>> 
>> Do $cinst.$objs.tabPane.$currenttab.$assign(3)
>> 
>> 
>> Tab 3 has the subform created.
>> If I click on the tab 3, I get an error message:
>> $init error 10203:The TO recipient parameter must be a list with atleast one column.
>> In the $contrust of the subform I have:
>> 
>> 
>> 
>> Do $cwind.$getAttachment() Returns lRow
>> 
>> In $CWind I have method $getAttachment with the line:
>> 
>> Quit method row(iPath,iFileName)
>> 
>> Where I am getting off the tangent?
>> Rgds,Martin O.
>> 
>>    On Sunday, July 17, 2022 at 07:18:05 PM GMT+3, Das Goravani <goravanis at gmail.com> wrote:  
>> 
>> 
>> I figured out a way around this problem. I’m good now. 
>> 
>> _____________________________________________________________
>> Manage your list subscriptions at https://lists.omnis-dev.com
>> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 
>> 
>> _____________________________________________________________
>> Manage your list subscriptions at https://lists.omnis-dev.com
>> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 
> 
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 
> 
> _____________________________________________________________
> Manage your list subscriptions at https://lists.omnis-dev.com
> Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 

_____________________________________________________________
Manage your list subscriptions at https://lists.omnis-dev.com
Start a new message -> mailto:omnisdev-en at lists.omnis-dev.com 
  


More information about the omnisdev-en mailing list