4 Replies Latest reply on Jul 16, 2012 11:52 AM by AntonChuykin

    Extended usage of List function



      Extended usage of List function


      Dear Friends,

         I would like to build a table where I can mark people to be included in mail list. I use checkbox to mark this people. I need this to define who can get emails, that I send automatically and who can not. I run it as a small portal row. I find it very useful. I used List function to get my email list, but now, with all this restrictions, how can I exclude rejected people from the list? Maybe my screenshot will make my question clearer.


        • 1. Re: Extended usage of List function

          I see three check boxes. In one field or three? Selecting which box or boxes indicates that they should be in the list?

          Those details affect the calculation you might use.

          In general, it can look like this:

          Define a calculation field, cEmailIfSelected such as:

          If (  <test expression here> ; Email )

          Then List ( relatedTable::cEmailIfSelected )

          will return your list of emails.

          What exact expression you put in place of <test expression here> will depend on how you set up your check boxes and which value or values indicate that it should be part of this list. If you have a single field with multiple check boxes, you'll need to use the FilterValues function to determine which values were selected.

          • 2. Re: Extended usage of List function

            Dear Phil,

            These are 3 different fields. Each checkbox will allow, or not, system to send emails with attached Order, Invoice or Packing list. And this should be done user-by-user. In my example if I click SEND INVOICE I want them to be sent to irina@test.com and antah@me.com and ingnore kotov@test.com. If I want to send ADDendum -> system will ingnore antah@me.com.

            • 3. Re: Extended usage of List function

              Which means that you sould need three such pairs of if funcitons and list calcualtions if you continue to use this approach. There might be simpler options, however that work directly from a found set instead of the list of emails.

              cSendInvoiceEmail:   If ( Not IsEmpty (sendInvoicecheckbox) ; EmailField 0

              cSendInvoiceList:   List ( RelatedTable::cSendInvoiceEmail)

              repeat for the other two email options.

              • 4. Re: Extended usage of List function

                Very well done! Thank you! working like a magic! Just a little thing I adjusted:

                cSendInvoiceList: Substitute ( List ( RelatedTable::cSendInvoiceEmail ) ; ¶ ; "; " )

                this will help my email client to divide addresses.... i hope