|
POST
|
The URL should be to the Feature Service REST URL not the item page ( so it should end in /FeatureServer like http://stuff/FeatureServer). In the bottom right of the item page under Layers section you will see each layer listed with a link to the Service URL - this is the one you want in the form settings page. Also make sure you use the name in the Layers list in the form_id field next to the URL on the settings page. This is how it finds the exact layer to use. This also allows you to have multiple forms pointing to the same master feature service. Hope that helps.
... View more
08-01-2018
06:49 AM
|
0
|
2
|
2103
|
|
POST
|
It is looking like any question in a relevant that is never used gets assigned empty string "". I would think it would get Null but no it is empty string. I have a conversion script that gets tripped up trying to put a empty string in a Int field. I can program around it but wondering if there is a way to change this. I would prefer Null. Thanks
... View more
07-30-2018
07:33 AM
|
0
|
2
|
1053
|
|
POST
|
I got this to work for repeats In a repeat have a field with a calculate (it can be editable) Use this formula subbing in any field in the repeat (except itself) once(count(${RecKey})) ref https://community.esri.com/message/787003-re-survey123-functionality-calculate-position-in-repeat-group?commentID=787003&et=watches.email.thread#comment-787003
... View more
07-24-2018
11:56 AM
|
0
|
0
|
2154
|
|
POST
|
I got this simple one to work now I got this to work for repeats In a repeat have a field with a calculate (it can be editable) Use this formula subbing in any field in the repeat (except itself) once(count(${RecKey})) ref https://community.esri.com/message/787003-re-survey123-functionality-calculate-position-in-repeat-group?commentID=787003&et=watches.email.thread#comment-787003
... View more
07-24-2018
11:56 AM
|
0
|
0
|
1963
|
|
POST
|
I got this to work for repeats In a repeat have a field with a calculate (it can be editable) Use this formula subbing in any field in the repeat (except itself) once(count(${RecKey})) ref https://community.esri.com/message/787003-re-survey123-functionality-calculate-position-in-repeat-group?commentID=787003&et=watches.email.thread#comment-787003
... View more
07-24-2018
11:54 AM
|
4
|
5
|
6237
|
|
POST
|
That works - thanks a lot! For everyone else here is how to do autonumbering. In a repeat have a field with a calculate (it can be editable) Use this formula subbing in any field in the repeat (except itself) once(count(${RecKey})) I have never seen once before. Is it documented somewhere? I am surprised esri never mentioned this to anyone. Thanks again.
... View more
07-24-2018
11:50 AM
|
4
|
6
|
6594
|
|
POST
|
I used this flow. It is based on using collector but concepts the same. Create the form and publish. Download the form feature service as a gdb. Create a new GDB in catalog - this holds your collector features. Add the FS that collector is going to use (point, line, whatever). Add a key field to the collector class then pass this value to Survey123 (like you have been doing). Copy the Survey123 FC you downloaded into the collector gdb. Create a Relationship class from the Collector FC to the Survey123 FC. Publish this gdb as a service. Go into the Survey123 form and set the submission_url to the new HFS you just published. Republish the form. Now you can add the collector service to a map and all the relationship classes come along. Now you have your collector features connected to your forms. Forms to lines or polygons or whatever does not matter. I have this working with 9 forms/9 relationships classes and works great. I can list all the forms for a feature or open a form and backtrack to the feature. Plus if you export the HFS to a GDB all the relationships classes come with it. They also works in ArcMap when connecting to the HFS directly. Oh and you can even see the linked forms in Collector - even other peoples forms! Also what I did was add a field called XForm and put the item id in that field. Then in the collector map I can use that field to construct the URL. It then launches and prefills in the "Key" field you decided to use. This way you can actually mix and match forms if you want. Say 2017 features link to the 2017 form but the 2018 features link to the 2018 form. Hope that makes sense and helps you.
... View more
07-24-2018
11:28 AM
|
1
|
4
|
2103
|
|
BLOG
|
Any updates on the speed issues? I am really taking some heat for it. Esp after 3+ months. Thanks
... View more
07-23-2018
03:00 PM
|
0
|
0
|
7881
|
|
POST
|
Ok I got it after some searching. GMAIL is much different. Do this change this line #server = smtplib.SMTP(emailSMTP) to server = smtplib.SMTP_SSL(emailSMTP,465) Remove the port number from the top so change emailSMTP = "smtp.gmail.com:587" to just emailSMTP = "smtp.gmail.com" Change this line #server.starttls() to server.ehlo() Add your username and pass to the lines smtpusername = "[email protected]" smtppassword = "pass" Oh and the big one is go to https://myaccount.google.com/lesssecureapps?pli=1 then enable access!! It now works.
... View more
07-19-2018
10:27 AM
|
1
|
1
|
8331
|
|
POST
|
Wait looking at your script you don't use any arcpy stuff so you can just get rid of the import arcpy line.
... View more
07-19-2018
07:13 AM
|
0
|
3
|
2446
|
|
POST
|
This looks like it is failing on import arcpy? Is this running on a machine with arc installed? Are you maybe trying to run it on a server? What are you running scripts in? Just Idle or command line? Get PyScripter i you can. Then just do a import arcpy to see if that works. Your python may not be setup correctly. Sorry not sure how familiar you are with python but this seems to show it is not even trying the script. Does a 1 line script with just import arcpy in it work?
... View more
07-19-2018
07:04 AM
|
0
|
4
|
2446
|
|
POST
|
Your email code looks different than mine. This one worked for years for me. '''-------------------------------------------------------------------------------
Name: How to Send Email with Attachment.py
HTML and Attachemnt are turned off in this sample
-------------------------------------------------------------------------------'''
import arcpy
import smtplib
import mimetypes
from email.mime.multipart import MIMEMultipart
from email import encoders
from email.message import Message
from email.mime.audio import MIMEAudio
from email.mime.base import MIMEBase
from email.mime.image import MIMEImage
from email.mime.text import MIMEText
# May work
#emailSMTP = "smtp.gmail.com:587"
# Will work
emailSMTP = "yoursmtp.com"
smtpusername = "[email protected]"
smtppassword = "pass"
# Set To and From
emailfrom = "[email protected]"
# Weird but the msg["To"] must be a string but the call to the smtp server must be a list see line 71. not easy to figrue out
# List can be a single text also but easier to just always be a list so that split code works
# This is who it will send to. Always make this a list so that the split and join below work
emailRecList = ["[email protected]","[email protected]"] # or emailRecList = ["[email protected]"]
# this is a text list it needs for the to
emailto = ','.join(emailRecList)
# give a path to a file or set a flag by setting = no
#fileToSend = r"c:\temp\temp.pdf"
fileToSend = "no"
msg = MIMEMultipart()
msg["From"] = emailfrom
msg["To"] = emailto
# Can set any Subject here
msg["Subject"] = "Form Attached"
# No Idea where this goes
msg.preamble = "Where is this"
# For text - plain or HTML
# Plain Sample
text = "Hi!\nHow are you?\nHere is the text you wanted."
# HTML sample
html = """\
<html>
<head></head>
<body>
<p>Hi!<br>
How are you?<br>
Here is the <a href="https://www.python.org">link</a> you wanted.
</p>
</body>
</html>
"""
part1 = MIMEText(text, 'plain')
part2 = MIMEText(html, 'html')
msg.attach(part1)
# Uncomment out to send HTML
#msg.attach(part2)
# For attachement
if fileToSend != "no":
ctype, encoding = mimetypes.guess_type(fileToSend)
if ctype is None or encoding is not None:
ctype = "application/octet-stream"
maintype, subtype = ctype.split("/", 1)
fp = open(fileToSend, "rb")
attachment = MIMEBase(maintype, subtype)
attachment.set_payload(fp.read())
fp.close()
encoders.encode_base64(attachment)
attachment.add_header("Content-Disposition", "attachment", filename=fileToSend)
msg.attach(attachment)
# Send section
server = smtplib.SMTP(emailSMTP)
server.starttls()
server.login(smtpusername,smtppassword) # password not needed for me but you may
# Weird but the msg["To"] must be a string but the call to the smtp server must be a list
server.sendmail(emailfrom, emailRecList, msg.as_string())
server.quit()
... View more
07-18-2018
01:20 PM
|
0
|
6
|
2446
|
|
POST
|
Looks like your code is assuming port 25 but gmail usese a different port. First hit on google so it may be old. Gmail Free SMTP Server Information You can use Gmail’s SMTP server information in a number of different places. You can use this in your local email client like Microsoft Outlook or within your WordPress site with a plugin like Gmail SMTP or SendGrid. Check out our tutorial on how to send emails from within WordPress. Outgoing Mail (SMTP) Server: smtp.gmail.com Use Authentication: Yes Use Secure Connection: Yes (this can be TLS or SSL depending on your mail client) Username: GMail account ([email protected]) Password: GMail password Port: 465 or 587
... View more
07-18-2018
12:46 PM
|
0
|
8
|
2446
|
|
POST
|
Yea I can understand limitations but then say that in the doc. It should really be a list of what works and does not but at least mention that there are some. Why hide this info? It can cost people lots of time. Esp when so much of the help files use in_memory so interchangeably. Anyways the reason I said it works like a GDB is based on experience with shp files. If you copy a shp file to a in_memory space it will then act like a GDB. One example is creating a new int field. In a shp file it defaults the field to 0 but in a GDB it defaults to Null. (This tripped up a script I was speeding up for someone that was counting on the 0.) Thanks
... View more
07-18-2018
10:28 AM
|
0
|
0
|
3261
|
|
POST
|
I just discovered that some SQL statements that work just fine on a GDB do not work on in_memory datasets. My issue was CAST. It works just fine in ArcMap and when I hit a GDB directly. But with a in_memory it says invalid SQL statement. I found this post where Esri says they are different but do not give any doc or hints as to what is and what is not supported. https://community.esri.com/thread/165846 Please Esri document this stuff! It costs lots of hours. Thanks
... View more
07-18-2018
10:16 AM
|
1
|
0
|
1786
|
| Title | Kudos | Posted |
|---|---|---|
| 3 | Tuesday | |
| 1 | Tuesday | |
| 7 | Tuesday | |
| 3 | Tuesday | |
| 1 | 04-10-2026 08:18 AM |
| Online Status |
Online
|
| Date Last Visited |
yesterday
|