Comments (10)
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?
from crowdsource-reporter-scripts.
@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.
@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.
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.
@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
.
from crowdsource-reporter-scripts.
This is a known limitation with this tool. it displays the field value not the alias associated with that value.
from crowdsource-reporter-scripts.
@allisonmuise OK, thank you for the response. Are there any known work-arounds to get the alias to display?
from crowdsource-reporter-scripts.
@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.
from crowdsource-reporter-scripts.
We will not be enhancing this tool with this feature.
from crowdsource-reporter-scripts.
Related Issues (20)
- Send Email parameter help HOT 1
- add message to cityworks tool
- issue selecting a table from the current map HOT 9
- BUG-000113656 The documentation for Send Email Notifications Scripts do not say the tools do not send emails. HOT 1
- BUG-000113756 The ServiceFunction.py script produces errors indicating it could not read the email template when no substitution is used in the email. HOT 2
- ENH-000114300 Allow apps that use crowd source reporter to moderate comments. HOT 1
- confirm order of operations for email
- add support for domains
- sql parameters
- enrich tool: preserve enrichment layer & target field
- issue with subbing values not from fields
- reduce connections to email server to 1/script run
- Connect2Cityworks.pyt KeyError operationalLayers HOT 3
- Remove calls to _get_features() function and replace with Python API's Query call
- Update any edit_features()/query() call to ONLY retrieve/send edits for needed attributes
- No module named 'send_email' HOT 4
- Enrich is currently query all features which can really slow when there are many rows in the layer
- Crowdsource to Cityworks integration error: json.decoder.JSONDecodeError HOT 2
- One of maps wouldn't open on a mobile HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crowdsource-reporter-scripts.