Adding to 2 tables [ was -FMScript]

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Adding to 2 tables [ was -FMScript]

detlef.hebbel
Very helpful Ola! Thanks again.

Next: Would anybody have a sample code handy, to let Lasso from a submit
form 'add' into 2 tables in the same FM database at the same time using
inlines?

How to change the sample inline below, to add not only to the table
'Enquiries', but also to the table 'Archive' in the same database at the
same time?

[Inline:
-Add,
-Database='Contacts',
-Table='Enquiries',
-KeyField='ID',
 'First_Name'='Mark',
 'Last_Name'='Nuevo']

[/Inline]



Thanks and cheers from New Zealand

Detlef Hebbel
-------------------------------------------------------------
Lasso ­ Apprentice :)









on 06.07.2005 20:00, Ola Andersson at [hidden email] wrote:

> 05-07-06 09.11 skrev Detlef Hebbel ([hidden email]):
>
>> Thanks Ole.
>>
>> This looks like a very interesting solution to my problem, ... and probably
>> helps me to get more independent from FM as well. Good move. I will try and
>> test how it will work. I bit of a learning curve for me!
>>
>> Is there also a possibility to actually let Lasso from a submit form 'add'
>> into 2 tables at the same time? i.e with multiple inlines?
>
> Yes!
>
> /Ola
> ----------------------------------------------------------------
> Ola Andersson. Technical Director, Immitt.com
> http://www.immitt.com/
>
>
>
>



--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Adding to 2 tables [ was -FMScript]

Doug Gentry
Yes - just add another inline underneath. No need to nest them in this
situation.  Your archives solution, though, may be more complicated
that just a strict mirroring of one database with another.

[Inline:
-Add,
-Database='Contacts',
-Table='Enquiries',
-KeyField='ID',
  'First_Name'='Mark',
  'Last_Name'='Nuevo']

[/Inline]


[Inline:
-Add,
-Database='Archives',
-Table='Enquiries',
-KeyField='ID',
  'First_Name'='Mark',
  'Last_Name'='Nuevo']

[/Inline]

...Doug

On Jul 6, 2005, at 1:30 AM, Detlef Hebbel wrote:

> Very helpful Ola! Thanks again.
>
> Next: Would anybody have a sample code handy, to let Lasso from a
> submit
> form 'add' into 2 tables in the same FM database at the same time using
> inlines?
>
> How to change the sample inline below, to add not only to the table
> 'Enquiries', but also to the table 'Archive' in the same database at
> the
> same time?
>
> [Inline:
> -Add,
> -Database='Contacts',
> -Table='Enquiries',
> -KeyField='ID',
>  'First_Name'='Mark',
>  'Last_Name'='Nuevo']
>
> [/Inline]
>

---
Doug Gentry
Dynapolis & Southern Oregon University
p:  541-261-8501 / Toll Free: 888-490-0644
[hidden email]


--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Adding to 2 tables [ was -FMScript]

detlef.hebbel
In reply to this post by detlef.hebbel
Thanks Doug.

With two inlines, each field would appear twice on the submit form, right?

How can I hide the fields of the second inline, can I use for the second
inline can I use Action_Param?:

<input type="hidden" name="First_Name" value="[Action_Param: 'First_Name']>

Looking like this:

[Inline:
 -Add,
 -Database='Archives',
 -Table='Enquiries',
 -KeyField='ID']

<input type="hidden" name="First_Name" value="[Action_Param: 'First_Name']>
 
[/Inline]


Would this work for the second inline?


Thanks and cheers from New Zealand

Detlef Hebbel
-------------------------------------------------------------
Lasso ­ Apprentice :)




on 07.07.2005 01:37, Doug Gentry at [hidden email] wrote:

> Yes - just add another inline underneath. No need to nest them in this
> situation.  Your archives solution, though, may be more complicated
> that just a strict mirroring of one database with another.
>
> [Inline:
> -Add,
> -Database='Contacts',
> -Table='Enquiries',
> -KeyField='ID',
>   'First_Name'='Mark',
>   'Last_Name'='Nuevo']
>
> [/Inline]
>
>
> [Inline:
> -Add,
> -Database='Archives',
> -Table='Enquiries',
> -KeyField='ID',
>   'First_Name'='Mark',
>   'Last_Name'='Nuevo']
>
> [/Inline]
>
> ...Doug
>
> On Jul 6, 2005, at 1:30 AM, Detlef Hebbel wrote:
>
>> Very helpful Ola! Thanks again.
>>
>> Next: Would anybody have a sample code handy, to let Lasso from a
>> submit
>> form 'add' into 2 tables in the same FM database at the same time using
>> inlines?
>>
>> How to change the sample inline below, to add not only to the table
>> 'Enquiries', but also to the table 'Archive' in the same database at
>> the
>> same time?
>>
>> [Inline:
>> -Add,
>> -Database='Contacts',
>> -Table='Enquiries',
>> -KeyField='ID',
>>  'First_Name'='Mark',
>>  'Last_Name'='Nuevo']
>>
>> [/Inline]
>>
>
> ---
> Doug Gentry
> Dynapolis & Southern Oregon University
> p:  541-261-8501 / Toll Free: 888-490-0644
> [hidden email]
>



--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Adding to 2 tables [ was -FMScript]

Douglas Burchard
In reply to this post by detlef.hebbel
On Jul 6, 2005, at 12:30 PM, Detlef Hebbel wrote:

> With two inlines, each field would appear twice on the submit form,  
> right?

No. The form and the inlines are entirely separate constructs. The  
any single form entry results in an action_param. Each action_param  
can be used as many times as you need within the response page:

On the form page:

     <input type="hidden" name="First_Name" value="">

On the response page:

     [Inline:
             -Add,
             -Database='Contacts',
             -Table='Enquiries',
             -KeyField='ID'
             'First_Name'=(Action_Param: 'First_Name')]
     [/Inline]

     [Inline:
             -Add,
             -Database='Archives',
             -Table='Enquiries',
             -KeyField='ID'
             'First_Name'=(Action_Param: 'First_Name')]
     [/Inline]

     <!-- And if you need to display a completed form entry on the  
response page. -->
     <input type="hidden" name="First_Name" value="[Action_Param:  
'First_Name']">


--
Douglas Burchard, President
DouglasBurchard.com, Web Applications
15024 NE 66th Street
Redmond, WA  98052, USA

direct: (206) 227-8161
[hidden email]
http://www.douglasburchard.com/


--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Adding to 2 tables [ was -FMScript]

detlef.hebbel
In reply to this post by detlef.hebbel
Thanks Doug.

I'll test this today.

Cheers
Detlef


on 07.07.2005 07:52, Douglas Burchard at
[hidden email] wrote:

> On Jul 6, 2005, at 12:30 PM, Detlef Hebbel wrote:
>
>> With two inlines, each field would appear twice on the submit form,
>> right?
>
> No. The form and the inlines are entirely separate constructs. The
> any single form entry results in an action_param. Each action_param
> can be used as many times as you need within the response page:
>
> On the form page:
>
>      <input type="hidden" name="First_Name" value="">
>
> On the response page:
>
>      [Inline:
>              -Add,
>              -Database='Contacts',
>              -Table='Enquiries',
>              -KeyField='ID'
>              'First_Name'=(Action_Param: 'First_Name')]
>      [/Inline]
>
>      [Inline:
>              -Add,
>              -Database='Archives',
>              -Table='Enquiries',
>              -KeyField='ID'
>              'First_Name'=(Action_Param: 'First_Name')]
>      [/Inline]
>
>      <!-- And if you need to display a completed form entry on the
> response page. -->
>      <input type="hidden" name="First_Name" value="[Action_Param:
> 'First_Name']">
>
>
> --
> Douglas Burchard, President
> DouglasBurchard.com, Web Applications
> 15024 NE 66th Street
> Redmond, WA  98052, USA
>
> direct: (206) 227-8161
> [hidden email]
> http://www.douglasburchard.com/
>



--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Adding to 2 tables [ was -FMScript]

detlef.hebbel
In reply to this post by detlef.hebbel
Works fine!
In order to create a relationship between the 'multiple' entries into
several tables with the same record, is it recommendable to use the
Session_Id tag '[Session_ID]" to form a relationship?

Or is any other way recommended?


Thanks and cheers from New Zealand

Detlef Hebbel
-------------------------------------------------------------
Lasso ­ Apprentice :)




on 07.07.2005 08:00, Detlef Hebbel at [hidden email] wrote:

> Thanks Doug.
>
> I'll test this today.
>
> Cheers
> Detlef
>
>
> on 07.07.2005 07:52, Douglas Burchard at
> [hidden email] wrote:
>
>> On Jul 6, 2005, at 12:30 PM, Detlef Hebbel wrote:
>>
>>> With two inlines, each field would appear twice on the submit form,
>>> right?
>>
>> No. The form and the inlines are entirely separate constructs. The
>> any single form entry results in an action_param. Each action_param
>> can be used as many times as you need within the response page:
>>
>> On the form page:
>>
>>      <input type="hidden" name="First_Name" value="">
>>
>> On the response page:
>>
>>      [Inline:
>>              -Add,
>>              -Database='Contacts',
>>              -Table='Enquiries',
>>              -KeyField='ID'
>>              'First_Name'=(Action_Param: 'First_Name')]
>>      [/Inline]
>>
>>      [Inline:
>>              -Add,
>>              -Database='Archives',
>>              -Table='Enquiries',
>>              -KeyField='ID'
>>              'First_Name'=(Action_Param: 'First_Name')]
>>      [/Inline]
>>
>>      <!-- And if you need to display a completed form entry on the
>> response page. -->
>>      <input type="hidden" name="First_Name" value="[Action_Param:
>> 'First_Name']">
>>
>>
>> --
>> Douglas Burchard, President
>> DouglasBurchard.com, Web Applications
>> 15024 NE 66th Street
>> Redmond, WA  98052, USA
>>
>> direct: (206) 227-8161
>> [hidden email]
>> http://www.douglasburchard.com/
>>
>
>



--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage
Reply | Threaded
Open this post in threaded view
|

Re: Adding to 2 tables [ was -FMScript]

Douglas Burchard
In reply to this post by detlef.hebbel
On Jul 6, 2005, at 2:28 PM, Detlef Hebbel wrote:

> Works fine!

Great!  :-)

> In order to create a relationship between the 'multiple' entries into
> several tables with the same record, is it recommendable to use the
> Session_Id tag '[Session_ID]" to form a relationship?
>
> Or is any other way recommended?

The above idea would work fine. If for any reason you wanted to  
create the actual ID in FileMaker, you could do something like:

      [Inline:
              -Add,
              -Database='Contacts',
              -Table='Enquiries',
              'First_Name'=(Action_Param: 'First_Name')]
         [Var: 'contactID' = (KeyField_Value)]
      [/Inline]

      [Inline:
              -Add,
              -Database='Archives',
              -Table='Enquiries',
              'Contacts_ID'=$contactID,
              'First_Name'=(Action_Param: 'First_Name')]
      [/Inline]

Whichever way works best for your needs.


--
Douglas Burchard, President
DouglasBurchard.com, Web Applications
15024 NE 66th Street
Redmond, WA  98052, USA

direct: (206) 227-8161
[hidden email]
http://www.douglasburchard.com/


--
------------------------------
Lasso Support: http://support.omnipilot.com/
Search the list archives: http://www.listsearch.com/lassotalk.lasso
Manage your list subscription:  
http://www.listsearch.com/lassotalk.lasso?manage