Custom Template not working; infinitely spinning icon.

855
4
11-03-2017 06:12 AM
PaulPanehal
New Contributor III

Hello,

I am having a problem using a custom template to print. I am fairly certain that the form itself is correct, but the printing is where the issue is. The default template does print normally. However, when the print button is pressed on the custom template, the icon constantly spins. The blocks of errors are as follows:

vendor.bundle.js:1 ERROR TypeError: Cannot read property 'toFixed' of undefined
at t.ngOnChanges (/assets/js/7.chunk.js:1)
at _n (vendor.bundle.js:1)
at hr (vendor.bundle.js:1)
at cr (vendor.bundle.js:1)
at Vr (vendor.bundle.js:1)
at Object.S.ɵvid.n [as updateDirectives] (/assets/js/7.chunk.js:1)
at Object.updateDirectives (vendor.bundle.js:1)
at ur (vendor.bundle.js:1)
at kr (vendor.bundle.js:1)
at wr (vendor.bundle.js:1)
at ur (vendor.bundle.js:1)
at kr (vendor.bundle.js:1)
at wr (vendor.bundle.js:1)
at ur (vendor.bundle.js:1)
at kr (vendor.bundle.js:1)
w @ vendor.bundle.js:1


vendor.bundle.js:1 ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'printMap' of undefined
TypeError: Cannot read property 'printMap' of undefined
at /assets/js/7.chunk.js:1
at new t (polyfills.bundle.js:1)
at t.getDataForQ (/assets/js/7.chunk.js:1)
at /assets/js/7.chunk.js:1
at Array.forEach (<anonymous>)
at t.prepareDataForCustomPrint (/assets/js/7.chunk.js:1)
at t.generateReport (/assets/js/7.chunk.js:1)
at Object.handleEvent (/assets/js/7.chunk.js:1)
at Object.w [as handleEvent] (vendor.bundle.js:1)
at Object.handleEvent (vendor.bundle.js:1)
at ie (vendor.bundle.js:1)
at vendor.bundle.js:1
at HTMLButtonElement.<anonymous> (vendor.bundle.js:1)
at t.invokeTask (polyfills.bundle.js:1)
at Object.onInvokeTask (vendor.bundle.js:1)
at /assets/js/7.chunk.js:1
at new t (polyfills.bundle.js:1)
at t.getDataForQ (/assets/js/7.chunk.js:1)
at /assets/js/7.chunk.js:1
at Array.forEach (<anonymous>)
at t.prepareDataForCustomPrint (/assets/js/7.chunk.js:1)
at t.generateReport (/assets/js/7.chunk.js:1)
at Object.handleEvent (/assets/js/7.chunk.js:1)
at Object.w [as handleEvent] (vendor.bundle.js:1)
at Object.handleEvent (vendor.bundle.js:1)
at ie (vendor.bundle.js:1)
at vendor.bundle.js:1
at HTMLButtonElement.<anonymous> (vendor.bundle.js:1)
at t.invokeTask (polyfills.bundle.js:1)
at Object.onInvokeTask (vendor.bundle.js:1)
at new m (polyfills.bundle.js:1)
at c (polyfills.bundle.js:1)
at c (polyfills.bundle.js:1)
at polyfills.bundle.js:1
at t.invokeTask (polyfills.bundle.js:1)
at Object.onInvokeTask (vendor.bundle.js:1)
at t.invokeTask (polyfills.bundle.js:1)
at e.runTask (polyfills.bundle.js:1)
at a (polyfills.bundle.js:1)
at HTMLButtonElement.invoke (polyfills.bundle.js:1)
w @ vendor.bundle.js:1


data Failed to load resource: the server responded with a status of 404 (Not Found)
707 Failed to load resource: the server responded with a status of 504 ()

What could be the problem? I have tried using my intended custom form, and I have also created a blank word document that only has one placeholder to fill that would be text.

It should be noted that this problem is while using an existing feature layer (~3000 records, of course printing only one) with all of the same fields that went into my Survey123 survey.

I did test a custom form with a completely new survey (a dummy test), and the custom form worked fine for that as a download link to the word document filled with survey information.

Any help would be greatly appreciated.

0 Kudos
4 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Paul,

Can you share the XLSForm & word doc of the survey?  The error indicates an unexpected data type conversion (text vs. numbers issue).

0 Kudos
PaulPanehal
New Contributor III

I had to remove some things from my attachments which might have partially broken the form.

Since I imported a lot of the information for the form from an existing feature class, of which I was not the owner, this might have caused some of the trouble.

The owner of the feature class made up a custom form, and he said he was able to print this. I wonder if this could be a  source to my problem?

Let me know if there is anything else I can add.

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Paul,

Thanks for the feedback.  We can attempt to duplicate the workflow and see if we can replicate the error.

0 Kudos
PaulPanehal
New Contributor III

Hi James,

I wanted to kind of reopen the issue again. We have found that the custom forms work just fine so long as the owner of the feature layer does the actual printing. It seems that the ownership of the feature layer being imported into a Survey is likely a limiting factor in using the custom forms. If this isn't already an issue, it might be worth trying to recreate a workflow like so:

  1. Create a survey using (importing) a feature layer owned by somebody else ("Person 2").
  2. Configure survey as desired.
  3. Create custom form, (don't have "Person 2" create the form).
  4. Attempt to leverage custom form and print it.
    • Does the infinitely spinning icon continue?
  5. In case that icon continues spinning, try having "Person 2" create a custom form with the same parameters.
    • Does this resolve the problem?

I seem to recall that users cannot use custom forms made by other people, so that explains my last step (Step 5). I also wanted to see if the idea of ownership is somehow an isolated issue, or is the issue in general. Let me know if my workflow idea isn't clear, or is not helpful.

Thank you,

Paul R. Panehal

0 Kudos