Hi,
I've created a form that contains a repeat that use's a script to enable users to copy the data from one repeat record to the next repeat record (so the fields as pre-populated). This works well apart from for one field which has an 'autocomplete' appearance. When this field is initially blank (for the first record in the repeat) the field is full width (see attached) and if the user tries to use the drop down arrow to browse for an option, or type in an option, the field just flickers and no option can be selected. If the magnifying glass search icon is pressed however the field re-sizes (see attached) to show the refresh button to the right of the field and the field then functions as expected and an option can be entered. On subsequent records in the repeat this isn't an issue as the refresh button automatically shows.
Could this be a potential issue with the refresh button somehow being initially obscured by the field? Just wondering if anyone else has experienced anything similar/has any ideas on how to get around this (or whether this should be raised with Esri Tech support?)
Many thanks
Any chance you can add a screen cap of the line in Excel?
Sounds like a calculate is attached to that field (hence the refresh icon). And after you "break" the connection the first time, it lets you add text normally (which is typical of a field with a calculate attached). What seems more odd is that it's being difficult about that first selection.
Many thanks for your response. I have set up the logic in the app following that described by AndyMcClary in response to this previous post Solved: Copy a Repeat Answer to the next Repeat in Survey1... - Esri Community
The script used is therefore:
function CopyRepeatPointData (repeat, recordnumber, fieldname)
{
if (recordnumber > 1) {
return repeat[recordnumber-2][fieldname];
}
}
And attached is the a screen shot of an extract of the XLSForm (there are more fields but I've stripped these out). The field highlighted yellow is the field that isn't working as expected.
Any advice would be really appreciated, thank you.
You have a calculate in that question, so the "refresh" symbol you are seeing is expected.
If you manually add a value to ${ID_Tallest_App}, the calculate is broken (aka, it won't automatically trigger again). If the user presses the refresh button, then their response will be cleared, and the calculate will trigger as normal. All of this assumes you haven't added a custom calculationMode (default is "auto").
There is no "refresh" icon when the page first loads because it only appears once the calculation is "broken" by user input (in your case, pressing the "magnifying glass"). If you press the "refresh" button, it should disappear again because you reset the field. The drop-down is likely disappearing because of how the calculate interacts with the autocomplete field in the Web Form.
Basically, things are "working as intended".
Now, that menu disappearing until the calculate is broken is likely a minor bug which should be reported to Esri. Creating a case with them is likely the easiest way to get that logged.
Thank you for looking into this, and explaining the above, this is really helpful. I'll aim to raise the issue around the dropdown disappearing until the calculate is broken with Esri.