Select to view content in your preferred language

Survey123 Connect concatenate date and pulldata result

588
11
Jump to solution
08-15-2024 11:45 AM
Elizabeth_Burniston
Regular Contributor

This is probably much easier than I am making it. I need to concatenate the year with a number generated from a pulldata calculation. It needs to read like this 24-xyzx. I know this is not the right syntax but essentially like this; %y-${formno}. I believe this needs to be in the constraint field... where I have the question marks. I receive the correct result in ${formno}, I just need to join this to the year. Let me know if you need more information! Thank you!

Elizabeth_Burniston_1-1723746852214.png

 

 

 

0 Kudos
11 Replies
DuncanC
Frequent Contributor

Looks like the datetime now() isn't working in that context.  Sorry, but I have no idea why.  If it works in connect I think it's likely a ESRI bug and not a issue with your code.  I haven't ran into a similar issue but I don't really use ESRI's web forms.  To debug I'd turn your hidden fields visible to confirm what is going on.  If you can't find a way to default a datetime on the the webform you may have to file a bug report with ESRI.  Personally I'd just give up on trying to make ESRI stuff work and roll my own web page to handle the work flow.  Shouldn't be easier,  but to build something I find acceptable, it ends up being easier.

0 Kudos
Elizabeth_Burniston
Regular Contributor

@DuncanC UPDATE: I found the problem and turning off the hidden fields worked in finding it. Using now() assumes I have a dateTime field. I don't. Only date. So, I changed now() to today() and it fixed the problem. Thanks! 

Thanks for your response! I'll try turning off the hidden fields to see if I discover anything. It feels like to make "Esri stuff work" it is always one step forward, two steps back. Ugh! Thank you again!