Giter Club home page Giter Club logo

Comments (10)

UnderJollyRoger avatar UnderJollyRoger commented on August 10, 2024

Hi Allison,

I'm attempting to send multiple emails, but my emails are four separate Email Settings because each one uses a query to grab a certain field and then sends to its corresponding recipient. The tool states that emails will be sent in the order listed. I'm finding that only the Recipient Email Address in the top one is being used, while the other Recipient Email Addresses are ignored. Have you seen this behavior?

image

from crowdsource-reporter-scripts.

allisonmuise avatar allisonmuise commented on August 10, 2024

@UnderJollyRoger I can't see your full SQL queries, but from what I can see, I would only expect the first one to work. The reason for this is if a feature meets the first SQL query, the email will be sent and the send_email field for tht feature will be updated to have the value 'sent'. This would exclude that record from any of the subsequent queries which, from what I can see, require that field to be either NULL or "".

from crowdsource-reporter-scripts.

UnderJollyRoger avatar UnderJollyRoger commented on August 10, 2024

@allisonmuise Thanks for the response. Here are the SQL Queries ordered as above:

send_email IS NULL Or send_email = '""' And field_2 = 'parcel_or_pin_question?'
send_email IS NULL Or send_email = '""' And field_2 = 'street_or_address_question?'
send_email IS NULL Or send_email = '""' And field_2 = 'tax_related_question?'
send_email IS NULL Or send_email = '""' And field_2 = 'zoning_or_flood_zone_question?'
send_email = '""' Or send_email IS NULL And field_2 = 'other'

I have a feature layer that's populated from Survey123. To test the Send Emails tool, I submitted 5 surveys, one for each category. I was assuming the emails would be sent by meeting the field_2 argument, and when it did the send_email field would be populated. Then, I thought it would move on to the next email. But, in this case the first recipient got all five emails. At least each email had one of the five category's in place of a keyword.

My purpose through the survey is to have the question sent in an email to its corresponding county department.

from crowdsource-reporter-scripts.

allisonmuise avatar allisonmuise commented on August 10, 2024

I see what you are trying to do now. It does still sound like there is a logical flaw in the queries. Try using each of those queries to select records from the REST endpoint of the service. To do what you are describing, only one feature should be returned by each query.

from crowdsource-reporter-scripts.

UnderJollyRoger avatar UnderJollyRoger commented on August 10, 2024

@allisonmuise It seems you were right about the flawed logic. I've removed Or send_email = "''". Now the queries seem to be triggering the correct emails to the correct recipients.

I was wondering if I could ask you something else. I have the email template set up so it looks for a key word and swaps it for a field in the table. This table belongs to a feature created through Survey123. The problem is the table shows one thing and the triggered email shows another. I can see where street_or_address_question? is coming from in the Survey123 XLSForm, but I want label to show up in the email not name.

Table:
image

Email:
ex

Survey123 XLSForm:
expor

from crowdsource-reporter-scripts.

allisonmuise avatar allisonmuise commented on August 10, 2024

This is a known limitation with this tool. it displays the field value not the alias associated with that value.

from crowdsource-reporter-scripts.

UnderJollyRoger avatar UnderJollyRoger commented on August 10, 2024

@allisonmuise OK, thank you for the response. Are there any known work-arounds to get the alias to display?

from crowdsource-reporter-scripts.

allisonmuise avatar allisonmuise commented on August 10, 2024

@UnderJollyRoger This is an enhancement that we have in our backlog for this script, but at this time, the only way to change this functionality is to modify the script.

from crowdsource-reporter-scripts.

allisonmuise avatar allisonmuise commented on August 10, 2024

#56

from crowdsource-reporter-scripts.

LindsayThomas avatar LindsayThomas commented on August 10, 2024

We will not be enhancing this tool with this feature.

from crowdsource-reporter-scripts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.