POST
|
Hi Brita, This is how I am attaching a survey123 report in my scenario. Note - My feature report is being published against a record that is already existing in a different feature service. If you want to attach the report to the new record you are capturing in survey123 you will need to capture the objected and globalid first. Let me know if you are doing this as I have another workflow that will help. You can choose to export as a PDF when creating your report. Configure it at https://survey123.arcgis.com/ (don't need to use cloud convert anymore)
... View more
05-14-2020
04:35 PM
|
0
|
0
|
1045
|
POST
|
SOLUTION The following will wait for a survey to be submitted and copy the photo to another record in a different feature service. This workflow could also be useful for attaching a Survey123 report to the original task. If you want to create a new record in a separate feature service and then add the attachment you could create another module that adds the feature first and then copy the attachments with the following scenario. Things to note; - You need the objected, globalid and feature service url for where you want the photo to copy to. - Any surveys without a photo attached can cause the scenario to error. Resolved by making the attachment required or using an error handler. -The data value needs to be in base64 - I have provided screenshots followed by the text input for those who want to copy paste - you will need to update the selections to reflect your scenario modules. Overall Workflow HTTP - Get a file URL {{24.attachmentInfo.photo_one[].url}} HTTP - Make a Request URL https://services7.arcgis.com/RB9EMffvnsUjBNXA/ArcGIS/rest/services/service_caeeb234234234234234234234234/FeatureServer/1/applyEdits Method POST Headers null Query String null Body Type Multipart/form-data Fields (3 of them broken down below) Field Type - Text Key - f Value - json Field Type - Text Key - attachments Value - {"adds":[{"objectid" : {{24.feature.attributes.wr_worktask_objectid}}, "parentGlobalId":"{{24.feature.attributes.wr_worktask_guid}}", "contentType": "image/jpeg", "name": "download.png", "data": "{{base64(36.data)}}"}]} Field Type - Text Key - f Value - json Field Type - Text Key - token Value - {{24.portalInfo.token}}
... View more
04-21-2020
06:44 PM
|
0
|
2
|
1045
|
BLOG
|
Hi Carl, Did you have any luck getting this to work? Cheers Mick
... View more
04-15-2020
01:19 AM
|
0
|
0
|
7991
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|