FMP Inlines.. How to?

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

FMP Inlines.. How to?

Israel Thompson
Hi all,

I have absolutely no experience with an add, update, or search inline
with Filemaker Pro. Can someone show me a quick example or point me in
the right direction? I've got a guy who is writing something like
this:

[
inline(
    action_params,
    -database='db',
    -table='tbl',
    'col'=$var,
    -update
    );
]

The problem he's having is $var is set to a value of "yes", but when
he runs his inline, it's inserting "yes yes" or more specifically
"yes\nyes". I guessed it might have something to do with the
"action_params" being present as well as the specific 'col'=$var, and
asked him to try something like the following:

[
inline(
   -database='db',
   -table='tbl',
   -keyfield='id',
   -keyvalue=action_param('id'),
    'name'=action_param('param'),
    'name'=action_param('param'),
    'name'=action_param('param'),
    'name'=action_param('param'),
    'name'=$var,
    'name'=action_param('param'),
    'name'=action_param('param')
   );
/inline;
]

He tried that and says he's receiving the following error:

958 Error while performing FileMaker database -update action.
Parameter missing in query.

Thanks for any help.

Sincerely,

Israel Thompson

#############################################################
This message is sent to you because you are subscribed to
  the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
To switch to the DIGEST mode, E-mail to <[hidden email]>
To switch to the INDEX mode, E-mail to <[hidden email]>
Send administrative queries to  <[hidden email]>

Reply | Threaded
Open this post in threaded view
|

Re: FMP Inlines.. How to?

stevepiercy
On 10/18/10 at 8:39 PM, [hidden email] (Israel
Thompson) pronounced:

>Hi all,
>
>I have absolutely no experience with an add, update, or search inline
>with Filemaker Pro. Can someone show me a quick example or point me in
>the right direction? I've got a guy who is writing something like
>this:
>
>[
>inline(
>action_params,
>-database='db',
>-table='tbl',
>'col'=$var,
>-update
>);
>]

That is not secure.  I can overwrite any field value on the
layout specified in the -table parameter.

>The problem he's having is $var is set to a value of "yes", but when
>he runs his inline, it's inserting "yes yes" or more specifically
>"yes\nyes". I guessed it might have something to do with the
>"action_params" being present as well as the specific 'col'=$var, and
>asked him to try something like the following:

Let's say that you have name=value in your action_params.  Then
in your inline you have action_params followed by

'name'='value2'

The last value for each named parameter is the only value that
gets used.

>[
>inline(
>-database='db',
>-table='tbl',
>-keyfield='id',
>-keyvalue=action_param('id'),
>'name'=action_param('param'),
>'name'=action_param('param'),
>'name'=action_param('param'),
>'name'=action_param('param'),
>'name'=$var,
>'name'=action_param('param'),
>'name'=action_param('param')
>);
>/inline;
>]
>
>He tried that and says he's receiving the following error:
>
>958 Error while performing FileMaker database -update action.
>Parameter missing in query.

You're missing -keyfield with -keyvalue, or
-key=array(-operator, field=value), to uniquely define the
record to be updated.  The corollary in SQL would be something like:

     update tbl
     set col = value
     where keyfield=keyvalue

or

     update tbl
     set col = value
     where f1=k1 and f2=k2 ...

--steve

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


#############################################################
This message is sent to you because you are subscribed to
  the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
To switch to the DIGEST mode, E-mail to <[hidden email]>
To switch to the INDEX mode, E-mail to <[hidden email]>
Send administrative queries to  <[hidden email]>

Reply | Threaded
Open this post in threaded view
|

Re: FMP Inlines.. How to?

Kevin Black-2
In reply to this post by Israel Thompson
Hmm... perhaps it's just because I did these back in Lasso 3.6, but I never did inlines in this type of structure before.

Here's my inline structure:

[inline: -database='dbname', -table='tablename', 'col'=(var:'varname'), -search] ... [/inline]

The ... is where the action would happen after I pulled the information on a search. For an update, I'd just have the [/inline] right after, although I have had it show that the update was successfully or provided myself with an error check procedure to test my inline.

I've used this with Filemaker since version 4. I'm now working with 10 and this inline is still solid, although I have the 3.6 syntax turned on. Still... it works.

On Oct 18, 2010, at 8:39 PM, Israel Thompson wrote:

> Hi all,
>
> I have absolutely no experience with an add, update, or search inline
> with Filemaker Pro. Can someone show me a quick example or point me in
> the right direction? I've got a guy who is writing something like
> this:
>
> [
> inline(
>    action_params,
>    -database='db',
>    -table='tbl',
>    'col'=$var,
>    -update
>    );
> ]
>
> The problem he's having is $var is set to a value of "yes", but when
> he runs his inline, it's inserting "yes yes" or more specifically
> "yes\nyes". I guessed it might have something to do with the
> "action_params" being present as well as the specific 'col'=$var, and
> asked him to try something like the following:
>
> [
> inline(
>   -database='db',
>   -table='tbl',
>   -keyfield='id',
>   -keyvalue=action_param('id'),
>    'name'=action_param('param'),
>    'name'=action_param('param'),
>    'name'=action_param('param'),
>    'name'=action_param('param'),
>    'name'=$var,
>    'name'=action_param('param'),
>    'name'=action_param('param')
>   );
> /inline;
> ]
>
> He tried that and says he's receiving the following error:
>
> 958 Error while performing FileMaker database -update action.
> Parameter missing in query.
>
> Thanks for any help.
>
> Sincerely,
>
> Israel Thompson
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list <[hidden email]>.
> To unsubscribe, E-mail to: <[hidden email]>
> To switch to the DIGEST mode, E-mail to <[hidden email]>
> To switch to the INDEX mode, E-mail to <[hidden email]>
> Send administrative queries to  <[hidden email]>
>

Kevin Black
[hidden email]




#############################################################
This message is sent to you because you are subscribed to
  the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
To switch to the DIGEST mode, E-mail to <[hidden email]>
To switch to the INDEX mode, E-mail to <[hidden email]>
Send administrative queries to  <[hidden email]>

Reply | Threaded
Open this post in threaded view
|

Re: FMP Inlines.. How to?

kimonostereo
In reply to this post by stevepiercy
Thank you to Izz for helping me privately on this matter as much as he could.

He's been helping me figure out how to do updates with form checkboxes and I've been pulling hair out and probably making him crazy at the same time!

Just to clarify what's going on with my lasso pages....

After a lookup, FM gives me back data from a previously filled form. On this returned data page I have this checkbox:

<input type="checkbox" name="primary_lives_with" value="yes" [field('primary_lives_with') == 'yes' ? 'checked="checked"'] />

On my update response page I have:

var('primary_lives_with' = action_param('primary_lives_with') == 'yes' ? 'yes' | 'no');

[inline: (Action_Params),
-database='ms-hs-forms',
-table='table',
-username='username',
-password='pass',
'primary_lives_with'=$primary_lives_with,
-update]
[/inline]

When updating the checkbox using this code, I can change a "yes" to a "no", but when I re-submit a checkbox it changes "no" into "yes\nyes" or
yes
yes

Forgive me, I haven't played in Lasso land in a long time. I could've sworn I had example code that dealt with checkboxes but I must have lost them.

thanks
\\scott\\




On Oct 18, 2010, at 4:18 PM, Steve Piercy - Web Site Builder wrote:

> On 10/18/10 at 8:39 PM, [hidden email] (Israel Thompson) pronounced:
>
>> Hi all,
>>
>> I have absolutely no experience with an add, update, or search inline
>> with Filemaker Pro. Can someone show me a quick example or point me in
>> the right direction? I've got a guy who is writing something like
>> this:
>>
>> [
>> inline(
>> action_params,
>> -database='db',
>> -table='tbl',
>> 'col'=$var,
>> -update
>> );
>> ]
>
> That is not secure.  I can overwrite any field value on the layout specified in the -table parameter.
>
>> The problem he's having is $var is set to a value of "yes", but when
>> he runs his inline, it's inserting "yes yes" or more specifically
>> "yes\nyes". I guessed it might have something to do with the
>> "action_params" being present as well as the specific 'col'=$var, and
>> asked him to try something like the following:
>
> Let's say that you have name=value in your action_params.  Then in your inline you have action_params followed by
>
> 'name'='value2'
>
> The last value for each named parameter is the only value that gets used.
>
>> [
>> inline(
>> -database='db',
>> -table='tbl',
>> -keyfield='id',
>> -keyvalue=action_param('id'),
>> 'name'=action_param('param'),
>> 'name'=action_param('param'),
>> 'name'=action_param('param'),
>> 'name'=action_param('param'),
>> 'name'=$var,
>> 'name'=action_param('param'),
>> 'name'=action_param('param')
>> );
>> /inline;
>> ]
>>
>> He tried that and says he's receiving the following error:
>>
>> 958 Error while performing FileMaker database -update action.
>> Parameter missing in query.
>
> You're missing -keyfield with -keyvalue, or -key=array(-operator, field=value), to uniquely define the record to be updated.  The corollary in SQL would be something like:
>
>    update tbl
>    set col = value
>    where keyfield=keyvalue
>
> or
>
>    update tbl
>    set col = value
>    where f1=k1 and f2=k2 ...
>
> --steve
>
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> Steve Piercy               Web Site Builder               Soquel, CA
> <[hidden email]>                  <http://www.StevePiercy.com/>
>
>
> #############################################################
> This message is sent to you because you are subscribed to
> the mailing list <[hidden email]>.
> To unsubscribe, E-mail to: <[hidden email]>
> To switch to the DIGEST mode, E-mail to <[hidden email]>
> To switch to the INDEX mode, E-mail to <[hidden email]>
> Send administrative queries to  <[hidden email]>
>


#############################################################
This message is sent to you because you are subscribed to
  the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
To switch to the DIGEST mode, E-mail to <[hidden email]>
To switch to the INDEX mode, E-mail to <[hidden email]>
Send administrative queries to  <[hidden email]>

Reply | Threaded
Open this post in threaded view
|

Re: FMP Inlines.. How to?

Jonathan Guthrie-5
Hey Scott, that's what this list is for... don't apologize :)

The only stupid question is the one that hasn't  been asked...


On 2010-10-19, at 11:41 AM, Scott Yoshinaga wrote:

> Forgive me, I haven't played in Lasso land in a long time. I could've sworn I had example code that dealt with checkboxes but I must have lost them.

Jonathan Guthrie

Treefrog Interactive Inc.
www.treefrog.ca
[hidden email]


#############################################################
This message is sent to you because you are subscribed to
  the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
To switch to the DIGEST mode, E-mail to <[hidden email]>
To switch to the INDEX mode, E-mail to <[hidden email]>
Send administrative queries to  <[hidden email]>

Reply | Threaded
Open this post in threaded view
|

Re: FMP Inlines.. How to?

Israel Thompson
Read what Steve says above, Scott... Since we've already established
the var that will always be defined for your checkbox value equaling
either yes or no, all you simply need to do now, is get your inline
formatted properly. The problem lies within the inline.

[
inline(
-database='db',
-table='tbl',
-keyfield=??,
-keyvalue=??,
'name'=action_param('param'),
'name'=action_param('param'),
'name'=action_param('param'),
'name'=action_param('param'),
'name'=$var,
'name'=action_param('param'),
'name'=action_param('param'),
-update
);
/inline;
]

I believe the method above should work with FMP. eAnd
-keyfield/-keyvalue were present in my previous example as far as I
saw, Steve... Am I missing something?

Izz


On Tue, Oct 19, 2010 at 11:11 AM, Jonathan Guthrie <[hidden email]> wrote:

> Hey Scott, that's what this list is for... don't apologize :)
>
> The only stupid question is the one that hasn't  been asked...
>
>
> On 2010-10-19, at 11:41 AM, Scott Yoshinaga wrote:
>
>> Forgive me, I haven't played in Lasso land in a long time. I could've sworn I had example code that dealt with checkboxes but I must have lost them.
>
> Jonathan Guthrie
>
> Treefrog Interactive Inc.
> www.treefrog.ca
> [hidden email]
>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list <[hidden email]>.
> To unsubscribe, E-mail to: <[hidden email]>
> To switch to the DIGEST mode, E-mail to <[hidden email]>
> To switch to the INDEX mode, E-mail to <[hidden email]>
> Send administrative queries to  <[hidden email]>
>
>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
To switch to the DIGEST mode, E-mail to <[hidden email]>
To switch to the INDEX mode, E-mail to <[hidden email]>
Send administrative queries to  <[hidden email]>

Reply | Threaded
Open this post in threaded view
|

Re: FMP Inlines.. How to?

kimonostereo
Thank you! This solved the issue. As soon as I put in the keyfield value manually, it updated without the doubling.

How do I automatically insert the -keyfield and -keyvalue?

I've tried

-keyfield=$keyfield_value

but that doesn't seem to work.

\\scott\\

On Oct 19, 2010, at 6:38 AM, Israel Thompson wrote:

> Read what Steve says above, Scott... Since we've already established
> the var that will always be defined for your checkbox value equaling
> either yes or no, all you simply need to do now, is get your inline
> formatted properly. The problem lies within the inline.
>
> [
> inline(
> -database='db',
> -table='tbl',
> -keyfield=??,
> -keyvalue=??,
> 'name'=action_param('param'),
> 'name'=action_param('param'),
> 'name'=action_param('param'),
> 'name'=action_param('param'),
> 'name'=$var,
> 'name'=action_param('param'),
> 'name'=action_param('param'),
> -update
> );
> /inline;
> ]
>
> I believe the method above should work with FMP. eAnd
> -keyfield/-keyvalue were present in my previous example as far as I
> saw, Steve... Am I missing something?
>
> Izz
>
>
> On Tue, Oct 19, 2010 at 11:11 AM, Jonathan Guthrie <[hidden email]> wrote:
>> Hey Scott, that's what this list is for... don't apologize :)
>>
>> The only stupid question is the one that hasn't  been asked...
>>
>>
>> On 2010-10-19, at 11:41 AM, Scott Yoshinaga wrote:
>>
>>> Forgive me, I haven't played in Lasso land in a long time. I could've sworn I had example code that dealt with checkboxes but I must have lost them.
>>
>> Jonathan Guthrie
>>
>> Treefrog Interactive Inc.
>> www.treefrog.ca
>> [hidden email]
>>
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>>  the mailing list <[hidden email]>.
>> To unsubscribe, E-mail to: <[hidden email]>
>> To switch to the DIGEST mode, E-mail to <[hidden email]>
>> To switch to the INDEX mode, E-mail to <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>>
>>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list <[hidden email]>.
> To unsubscribe, E-mail to: <[hidden email]>
> To switch to the DIGEST mode, E-mail to <[hidden email]>
> To switch to the INDEX mode, E-mail to <[hidden email]>
> Send administrative queries to  <[hidden email]>
>


#############################################################
This message is sent to you because you are subscribed to
  the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
To switch to the DIGEST mode, E-mail to <[hidden email]>
To switch to the INDEX mode, E-mail to <[hidden email]>
Send administrative queries to  <[hidden email]>

Reply | Threaded
Open this post in threaded view
|

Re: FMP Inlines.. How to?

Israel Thompson
-keyfield is the field that you have set as your primary key in the
table. (usually it's simply 'id')
-keyvalue is the specific item you're updating..

So if "id" is your keyfield and you're updating record id "174562", it
might look something like this:

-keyfield='id',
-keyvalue=174562,

The keyfield should never change, but the value will.

Izz


On Tue, Oct 19, 2010 at 12:46 PM, Scott Yoshinaga <[hidden email]> wrote:

> Thank you! This solved the issue. As soon as I put in the keyfield value manually, it updated without the doubling.
>
> How do I automatically insert the -keyfield and -keyvalue?
>
> I've tried
>
> -keyfield=$keyfield_value
>
> but that doesn't seem to work.
>
> \\scott\\
>
> On Oct 19, 2010, at 6:38 AM, Israel Thompson wrote:
>
>> Read what Steve says above, Scott... Since we've already established
>> the var that will always be defined for your checkbox value equaling
>> either yes or no, all you simply need to do now, is get your inline
>> formatted properly. The problem lies within the inline.
>>
>> [
>> inline(
>> -database='db',
>> -table='tbl',
>> -keyfield=??,
>> -keyvalue=??,
>> 'name'=action_param('param'),
>> 'name'=action_param('param'),
>> 'name'=action_param('param'),
>> 'name'=action_param('param'),
>> 'name'=$var,
>> 'name'=action_param('param'),
>> 'name'=action_param('param'),
>> -update
>> );
>> /inline;
>> ]
>>
>> I believe the method above should work with FMP. eAnd
>> -keyfield/-keyvalue were present in my previous example as far as I
>> saw, Steve... Am I missing something?
>>
>> Izz
>>
>>
>> On Tue, Oct 19, 2010 at 11:11 AM, Jonathan Guthrie <[hidden email]> wrote:
>>> Hey Scott, that's what this list is for... don't apologize :)
>>>
>>> The only stupid question is the one that hasn't  been asked...
>>>
>>>
>>> On 2010-10-19, at 11:41 AM, Scott Yoshinaga wrote:
>>>
>>>> Forgive me, I haven't played in Lasso land in a long time. I could've sworn I had example code that dealt with checkboxes but I must have lost them.
>>>
>>> Jonathan Guthrie
>>>
>>> Treefrog Interactive Inc.
>>> www.treefrog.ca
>>> [hidden email]
>>>
>>>
>>> #############################################################
>>> This message is sent to you because you are subscribed to
>>>  the mailing list <[hidden email]>.
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> To switch to the DIGEST mode, E-mail to <[hidden email]>
>>> To switch to the INDEX mode, E-mail to <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>>
>>>
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>>  the mailing list <[hidden email]>.
>> To unsubscribe, E-mail to: <[hidden email]>
>> To switch to the DIGEST mode, E-mail to <[hidden email]>
>> To switch to the INDEX mode, E-mail to <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>>
>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list <[hidden email]>.
> To unsubscribe, E-mail to: <[hidden email]>
> To switch to the DIGEST mode, E-mail to <[hidden email]>
> To switch to the INDEX mode, E-mail to <[hidden email]>
> Send administrative queries to  <[hidden email]>
>
>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
To switch to the DIGEST mode, E-mail to <[hidden email]>
To switch to the INDEX mode, E-mail to <[hidden email]>
Send administrative queries to  <[hidden email]>

Reply | Threaded
Open this post in threaded view
|

Re: FMP Inlines.. How to?

kimonostereo
Thanks Izz,

I guess I'm wondering how I get the -keyvalue in there without hardcoding it on the update response page.

On the update page I have this:
<input type="hidden" name="-KeyValue" value="[KeyField_Value]"/>

but how do I get [KeyField_value] on the update response inline?

\\scott\\

On Oct 19, 2010, at 8:38 AM, Israel Thompson wrote:

> -keyfield is the field that you have set as your primary key in the
> table. (usually it's simply 'id')
> -keyvalue is the specific item you're updating..
>
> So if "id" is your keyfield and you're updating record id "174562", it
> might look something like this:
>
> -keyfield='id',
> -keyvalue=174562,
>
> The keyfield should never change, but the value will.
>
> Izz
>
>
> On Tue, Oct 19, 2010 at 12:46 PM, Scott Yoshinaga <[hidden email]> wrote:
>> Thank you! This solved the issue. As soon as I put in the keyfield value manually, it updated without the doubling.
>>
>> How do I automatically insert the -keyfield and -keyvalue?
>>
>> I've tried
>>
>> -keyfield=$keyfield_value
>>
>> but that doesn't seem to work.
>>
>> \\scott\\
>>
>> On Oct 19, 2010, at 6:38 AM, Israel Thompson wrote:
>>
>>> Read what Steve says above, Scott... Since we've already established
>>> the var that will always be defined for your checkbox value equaling
>>> either yes or no, all you simply need to do now, is get your inline
>>> formatted properly. The problem lies within the inline.
>>>
>>> [
>>> inline(
>>> -database='db',
>>> -table='tbl',
>>> -keyfield=??,
>>> -keyvalue=??,
>>> 'name'=action_param('param'),
>>> 'name'=action_param('param'),
>>> 'name'=action_param('param'),
>>> 'name'=action_param('param'),
>>> 'name'=$var,
>>> 'name'=action_param('param'),
>>> 'name'=action_param('param'),
>>> -update
>>> );
>>> /inline;
>>> ]
>>>
>>> I believe the method above should work with FMP. eAnd
>>> -keyfield/-keyvalue were present in my previous example as far as I
>>> saw, Steve... Am I missing something?
>>>
>>> Izz
>>>
>>>
>>> On Tue, Oct 19, 2010 at 11:11 AM, Jonathan Guthrie <[hidden email]> wrote:
>>>> Hey Scott, that's what this list is for... don't apologize :)
>>>>
>>>> The only stupid question is the one that hasn't  been asked...
>>>>
>>>>
>>>> On 2010-10-19, at 11:41 AM, Scott Yoshinaga wrote:
>>>>
>>>>> Forgive me, I haven't played in Lasso land in a long time. I could've sworn I had example code that dealt with checkboxes but I must have lost them.
>>>>
>>>> Jonathan Guthrie
>>>>
>>>> Treefrog Interactive Inc.
>>>> www.treefrog.ca
>>>> [hidden email]
>>>>
>>>>
>>>> #############################################################
>>>> This message is sent to you because you are subscribed to
>>>>  the mailing list <[hidden email]>.
>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>> To switch to the DIGEST mode, E-mail to <[hidden email]>
>>>> To switch to the INDEX mode, E-mail to <[hidden email]>
>>>> Send administrative queries to  <[hidden email]>
>>>>
>>>>
>>>
>>> #############################################################
>>> This message is sent to you because you are subscribed to
>>>  the mailing list <[hidden email]>.
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> To switch to the DIGEST mode, E-mail to <[hidden email]>
>>> To switch to the INDEX mode, E-mail to <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>>
>>
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>>  the mailing list <[hidden email]>.
>> To unsubscribe, E-mail to: <[hidden email]>
>> To switch to the DIGEST mode, E-mail to <[hidden email]>
>> To switch to the INDEX mode, E-mail to <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>>
>>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list <[hidden email]>.
> To unsubscribe, E-mail to: <[hidden email]>
> To switch to the DIGEST mode, E-mail to <[hidden email]>
> To switch to the INDEX mode, E-mail to <[hidden email]>
> Send administrative queries to  <[hidden email]>
>


#############################################################
This message is sent to you because you are subscribed to
  the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
To switch to the DIGEST mode, E-mail to <[hidden email]>
To switch to the INDEX mode, E-mail to <[hidden email]>
Send administrative queries to  <[hidden email]>

Reply | Threaded
Open this post in threaded view
|

Re: FMP Inlines.. How to?

Israel Thompson
Form page:

<input type="hidden" name="id" value="[keyfield_value]">


Response page:

[
inline(
    -database='db',
    -table='tbl',
    -keyfield='id',
    -keyvalue=action_param('id')


Izz

On Tue, Oct 19, 2010 at 1:46 PM, Scott Yoshinaga <[hidden email]> wrote:

> Thanks Izz,
>
> I guess I'm wondering how I get the -keyvalue in there without hardcoding it on the update response page.
>
> On the update page I have this:
> <input type="hidden" name="-KeyValue" value="[KeyField_Value]"/>
>
> but how do I get [KeyField_value] on the update response inline?
>
> \\scott\\
>
> On Oct 19, 2010, at 8:38 AM, Israel Thompson wrote:
>
>> -keyfield is the field that you have set as your primary key in the
>> table. (usually it's simply 'id')
>> -keyvalue is the specific item you're updating..
>>
>> So if "id" is your keyfield and you're updating record id "174562", it
>> might look something like this:
>>
>> -keyfield='id',
>> -keyvalue=174562,
>>
>> The keyfield should never change, but the value will.
>>
>> Izz
>>
>>
>> On Tue, Oct 19, 2010 at 12:46 PM, Scott Yoshinaga <[hidden email]> wrote:
>>> Thank you! This solved the issue. As soon as I put in the keyfield value manually, it updated without the doubling.
>>>
>>> How do I automatically insert the -keyfield and -keyvalue?
>>>
>>> I've tried
>>>
>>> -keyfield=$keyfield_value
>>>
>>> but that doesn't seem to work.
>>>
>>> \\scott\\
>>>
>>> On Oct 19, 2010, at 6:38 AM, Israel Thompson wrote:
>>>
>>>> Read what Steve says above, Scott... Since we've already established
>>>> the var that will always be defined for your checkbox value equaling
>>>> either yes or no, all you simply need to do now, is get your inline
>>>> formatted properly. The problem lies within the inline.
>>>>
>>>> [
>>>> inline(
>>>> -database='db',
>>>> -table='tbl',
>>>> -keyfield=??,
>>>> -keyvalue=??,
>>>> 'name'=action_param('param'),
>>>> 'name'=action_param('param'),
>>>> 'name'=action_param('param'),
>>>> 'name'=action_param('param'),
>>>> 'name'=$var,
>>>> 'name'=action_param('param'),
>>>> 'name'=action_param('param'),
>>>> -update
>>>> );
>>>> /inline;
>>>> ]
>>>>
>>>> I believe the method above should work with FMP. eAnd
>>>> -keyfield/-keyvalue were present in my previous example as far as I
>>>> saw, Steve... Am I missing something?
>>>>
>>>> Izz
>>>>
>>>>
>>>> On Tue, Oct 19, 2010 at 11:11 AM, Jonathan Guthrie <[hidden email]> wrote:
>>>>> Hey Scott, that's what this list is for... don't apologize :)
>>>>>
>>>>> The only stupid question is the one that hasn't  been asked...
>>>>>
>>>>>
>>>>> On 2010-10-19, at 11:41 AM, Scott Yoshinaga wrote:
>>>>>
>>>>>> Forgive me, I haven't played in Lasso land in a long time. I could've sworn I had example code that dealt with checkboxes but I must have lost them.
>>>>>
>>>>> Jonathan Guthrie
>>>>>
>>>>> Treefrog Interactive Inc.
>>>>> www.treefrog.ca
>>>>> [hidden email]
>>>>>
>>>>>
>>>>> #############################################################
>>>>> This message is sent to you because you are subscribed to
>>>>>  the mailing list <[hidden email]>.
>>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>>> To switch to the DIGEST mode, E-mail to <[hidden email]>
>>>>> To switch to the INDEX mode, E-mail to <[hidden email]>
>>>>> Send administrative queries to  <[hidden email]>
>>>>>
>>>>>
>>>>
>>>> #############################################################
>>>> This message is sent to you because you are subscribed to
>>>>  the mailing list <[hidden email]>.
>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>> To switch to the DIGEST mode, E-mail to <[hidden email]>
>>>> To switch to the INDEX mode, E-mail to <[hidden email]>
>>>> Send administrative queries to  <[hidden email]>
>>>>
>>>
>>>
>>> #############################################################
>>> This message is sent to you because you are subscribed to
>>>  the mailing list <[hidden email]>.
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> To switch to the DIGEST mode, E-mail to <[hidden email]>
>>> To switch to the INDEX mode, E-mail to <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>>
>>>
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>>  the mailing list <[hidden email]>.
>> To unsubscribe, E-mail to: <[hidden email]>
>> To switch to the DIGEST mode, E-mail to <[hidden email]>
>> To switch to the INDEX mode, E-mail to <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>>
>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list <[hidden email]>.
> To unsubscribe, E-mail to: <[hidden email]>
> To switch to the DIGEST mode, E-mail to <[hidden email]>
> To switch to the INDEX mode, E-mail to <[hidden email]>
> Send administrative queries to  <[hidden email]>
>
>

#############################################################
This message is sent to you because you are subscribed to
  the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
To switch to the DIGEST mode, E-mail to <[hidden email]>
To switch to the INDEX mode, E-mail to <[hidden email]>
Send administrative queries to  <[hidden email]>

Reply | Threaded
Open this post in threaded view
|

Re: FMP Inlines.. How to?

kimonostereo
Got it!

I think i'm starting to understand it all now. The previous hidden field I was using was only for when I was using (action_params) to pass along the values.

Thanks again for the hand holding!

\\scott\\

On Oct 19, 2010, at 8:51 AM, Israel Thompson wrote:

> Form page:
>
> <input type="hidden" name="id" value="[keyfield_value]">
>
>
> Response page:
>
> [
> inline(
>    -database='db',
>    -table='tbl',
>    -keyfield='id',
>    -keyvalue=action_param('id')
>
>
> Izz
>
> On Tue, Oct 19, 2010 at 1:46 PM, Scott Yoshinaga <[hidden email]> wrote:
>> Thanks Izz,
>>
>> I guess I'm wondering how I get the -keyvalue in there without hardcoding it on the update response page.
>>
>> On the update page I have this:
>> <input type="hidden" name="-KeyValue" value="[KeyField_Value]"/>
>>
>> but how do I get [KeyField_value] on the update response inline?
>>
>> \\scott\\
>>
>> On Oct 19, 2010, at 8:38 AM, Israel Thompson wrote:
>>
>>> -keyfield is the field that you have set as your primary key in the
>>> table. (usually it's simply 'id')
>>> -keyvalue is the specific item you're updating..
>>>
>>> So if "id" is your keyfield and you're updating record id "174562", it
>>> might look something like this:
>>>
>>> -keyfield='id',
>>> -keyvalue=174562,
>>>
>>> The keyfield should never change, but the value will.
>>>
>>> Izz
>>>
>>>
>>> On Tue, Oct 19, 2010 at 12:46 PM, Scott Yoshinaga <[hidden email]> wrote:
>>>> Thank you! This solved the issue. As soon as I put in the keyfield value manually, it updated without the doubling.
>>>>
>>>> How do I automatically insert the -keyfield and -keyvalue?
>>>>
>>>> I've tried
>>>>
>>>> -keyfield=$keyfield_value
>>>>
>>>> but that doesn't seem to work.
>>>>
>>>> \\scott\\
>>>>
>>>> On Oct 19, 2010, at 6:38 AM, Israel Thompson wrote:
>>>>
>>>>> Read what Steve says above, Scott... Since we've already established
>>>>> the var that will always be defined for your checkbox value equaling
>>>>> either yes or no, all you simply need to do now, is get your inline
>>>>> formatted properly. The problem lies within the inline.
>>>>>
>>>>> [
>>>>> inline(
>>>>> -database='db',
>>>>> -table='tbl',
>>>>> -keyfield=??,
>>>>> -keyvalue=??,
>>>>> 'name'=action_param('param'),
>>>>> 'name'=action_param('param'),
>>>>> 'name'=action_param('param'),
>>>>> 'name'=action_param('param'),
>>>>> 'name'=$var,
>>>>> 'name'=action_param('param'),
>>>>> 'name'=action_param('param'),
>>>>> -update
>>>>> );
>>>>> /inline;
>>>>> ]
>>>>>
>>>>> I believe the method above should work with FMP. eAnd
>>>>> -keyfield/-keyvalue were present in my previous example as far as I
>>>>> saw, Steve... Am I missing something?
>>>>>
>>>>> Izz
>>>>>
>>>>>
>>>>> On Tue, Oct 19, 2010 at 11:11 AM, Jonathan Guthrie <[hidden email]> wrote:
>>>>>> Hey Scott, that's what this list is for... don't apologize :)
>>>>>>
>>>>>> The only stupid question is the one that hasn't  been asked...
>>>>>>
>>>>>>
>>>>>> On 2010-10-19, at 11:41 AM, Scott Yoshinaga wrote:
>>>>>>
>>>>>>> Forgive me, I haven't played in Lasso land in a long time. I could've sworn I had example code that dealt with checkboxes but I must have lost them.
>>>>>>
>>>>>> Jonathan Guthrie
>>>>>>
>>>>>> Treefrog Interactive Inc.
>>>>>> www.treefrog.ca
>>>>>> [hidden email]
>>>>>>
>>>>>>
>>>>>> #############################################################
>>>>>> This message is sent to you because you are subscribed to
>>>>>>  the mailing list <[hidden email]>.
>>>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>>>> To switch to the DIGEST mode, E-mail to <[hidden email]>
>>>>>> To switch to the INDEX mode, E-mail to <[hidden email]>
>>>>>> Send administrative queries to  <[hidden email]>
>>>>>>
>>>>>>
>>>>>
>>>>> #############################################################
>>>>> This message is sent to you because you are subscribed to
>>>>>  the mailing list <[hidden email]>.
>>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>>> To switch to the DIGEST mode, E-mail to <[hidden email]>
>>>>> To switch to the INDEX mode, E-mail to <[hidden email]>
>>>>> Send administrative queries to  <[hidden email]>
>>>>>
>>>>
>>>>
>>>> #############################################################
>>>> This message is sent to you because you are subscribed to
>>>>  the mailing list <[hidden email]>.
>>>> To unsubscribe, E-mail to: <[hidden email]>
>>>> To switch to the DIGEST mode, E-mail to <[hidden email]>
>>>> To switch to the INDEX mode, E-mail to <[hidden email]>
>>>> Send administrative queries to  <[hidden email]>
>>>>
>>>>
>>>
>>> #############################################################
>>> This message is sent to you because you are subscribed to
>>>  the mailing list <[hidden email]>.
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> To switch to the DIGEST mode, E-mail to <[hidden email]>
>>> To switch to the INDEX mode, E-mail to <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>>
>>
>>
>> #############################################################
>> This message is sent to you because you are subscribed to
>>  the mailing list <[hidden email]>.
>> To unsubscribe, E-mail to: <[hidden email]>
>> To switch to the DIGEST mode, E-mail to <[hidden email]>
>> To switch to the INDEX mode, E-mail to <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>>
>>
>
> #############################################################
> This message is sent to you because you are subscribed to
>  the mailing list <[hidden email]>.
> To unsubscribe, E-mail to: <[hidden email]>
> To switch to the DIGEST mode, E-mail to <[hidden email]>
> To switch to the INDEX mode, E-mail to <[hidden email]>
> Send administrative queries to  <[hidden email]>
>


#############################################################
This message is sent to you because you are subscribed to
  the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
To switch to the DIGEST mode, E-mail to <[hidden email]>
To switch to the INDEX mode, E-mail to <[hidden email]>
Send administrative queries to  <[hidden email]>