Hi, I am trying to use FME to create an Inspection in the Cityworks. How can I configure Answers for the Questions in FME? I believe I need to do that in the Additional Parameters Section but I cant figure out how to set it up. Can someone help pl
Best answer by danminneyatsaf
Hi @serg42932 you're on the right track with the Additional Parameters! This is the parameter you will want to use to fulfill these Questions and Answers for your Inspections.
To start off, here's an example of what your your Additional Parameters may look like:
{"Questions" : [ { "QuestionID" : 6439, "Explanation" : null, "Instruction" : null }, { "QuestionID" : 6440, "Explanation" : null, "Instruction" : null } ], "Answers" : [ { "QuestionID" : 6439, "AnswerId" : "6828", "AnswerValue" : "Not Operating Properly", "InspectionId" : 18658 }, { "QuestionID" : 6440, "AnswerId" : "6829", "AnswerValue" : "Poor Performance", "InspectionId" : 18658 } ] }
Each question and answer have a corresponding ID. If you're not sure what your QuestionIDs and AnswerIds are, you can use the following Cityworks REST API to get this information
https://<your-cityworks-instance>/services/Ams/InspectionTemplate/QA?data={
"InspTemplateIds": [6023]
}
You can use this REST API call in a HTTPCaller. Just make sure to change the Cityworks instance URL and the Inspection Template Id value. Also, you will want to make sure you are using your Cityworks Web Connection as authentication in the HTTPCaller.
I've attached a workspace to this response to help demonstrate how to perform these two steps. Let me know if you have any questions!
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.