Re: Data grid : show an button in a column only if there is an email in other column

2019-02-22 Thread Bob Sneidar via use-livecode
I believe this works this way because the fillInData message gets sent to the 
row group that is currently getting updated. Because of this, "me" refers to 
the current row group, nd btn "sendmail" of me refers to the specific instance 
of button "sendmail" in that group. Otherwise btn "sendmail" would simply refer 
to the first (of many) buttons named "sendmail". 

HTH

Bob S


> On Feb 20, 2019, at 10:06 , Ludovic via use-livecode 
>  wrote:
> 
> I was not far away !
> 
> Thank you.
> 
>> Le 20 févr. 2019 à 17:58, zryip theSlug via use-livecode 
>>  a écrit :
>> 
>> Ludovic,
>> 
>> Try:
>> 
>> on FillInData pData
>> 
>>   if pData["email"] <> "" then show btn  "sendmail" of me
>> 
>>   else hide btn  "sendmail" of me
>> 
>> end FillInData

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Data grid : show an button in a column only if there is an email in other column

2019-02-21 Thread Ludovic THEBAULT via use-livecode

> Le 20 févr. 2019 à 17:58, zryip theSlug via use-livecode 
>  a écrit :
> 
> Ludovic,
> 
> Try:
> 
> on FillInData pData
> 
>if pData["email"] <> "" then show btn  "sendmail" of me
> 
>else hide btn  "sendmail" of me
> 
> end FillInData
> 


As i use Table datagrid, pData is just the value of the cell, so with this 
script it’s work.

if GetDataOfIndex(the dgIndex of me, "email") <> "" then
 show btn  "sendmail" of me
 else hide btn  "sendmail" of me

Ludovic
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Data grid : show an button in a column only if there is an email in other column

2019-02-20 Thread Ludovic via use-livecode
I was not far away !

Thank you.

> Le 20 févr. 2019 à 17:58, zryip theSlug via use-livecode 
>  a écrit :
> 
> Ludovic,
> 
> Try:
> 
> on FillInData pData
> 
>if pData["email"] <> "" then show btn  "sendmail" of me
> 
>else hide btn  "sendmail" of me
> 
> end FillInData
> 
> On Wed, Feb 20, 2019 at 5:54 PM Ludovic THEBAULT via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> Hello,
>> 
>> I have an address table (data grid) including an "email" column. An other
>> column contains a button to send an email.  I want to hide this button if
>> the line does not contain an email.
>> I put this script in the behavior of the button column :
>> 
>> on FillInData pData
>> 
>>if pData["email"] <> "" then show btn  "sendmail"
>> 
>>else hide btn  "sendmail"
>> 
>> end FillInData
>> 
>> 
>> But it seem to work only for the first line of the table.
>> 
>> Any ideas ?
>> 
>> Thanks in advance !
>> 
>> Ludovic
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> 
> 
> -- 
> Zryip TheSlug
> http://www.aslugontheroad.com
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Data grid : show an button in a column only if there is an email in other column

2019-02-20 Thread zryip theSlug via use-livecode
Ludovic,

Try:

on FillInData pData

if pData["email"] <> "" then show btn  "sendmail" of me

else hide btn  "sendmail" of me

end FillInData

On Wed, Feb 20, 2019 at 5:54 PM Ludovic THEBAULT via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hello,
>
> I have an address table (data grid) including an "email" column. An other
> column contains a button to send an email.  I want to hide this button if
> the line does not contain an email.
> I put this script in the behavior of the button column :
>
> on FillInData pData
>
> if pData["email"] <> "" then show btn  "sendmail"
>
> else hide btn  "sendmail"
>
> end FillInData
>
>
> But it seem to work only for the first line of the table.
>
> Any ideas ?
>
> Thanks in advance !
>
> Ludovic
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


-- 
Zryip TheSlug
http://www.aslugontheroad.com
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Data grid : show an button in a column only if there is an email in other column

2019-02-20 Thread Ludovic THEBAULT via use-livecode
Hello,

I have an address table (data grid) including an "email" column. An other 
column contains a button to send an email.  I want to hide this button if the 
line does not contain an email.
I put this script in the behavior of the button column :

on FillInData pData

if pData["email"] <> "" then show btn  "sendmail"

else hide btn  "sendmail"

end FillInData


But it seem to work only for the first line of the table.

Any ideas ?

Thanks in advance !

Ludovic
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode