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

zryip theSlug zryip.theslug at gmail.com
Wed Feb 20 11:58:27 EST 2019


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 at 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 at 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



More information about the Use-livecode mailing list