-
One more thing - I was still curious, so I tested in the browser. I'm attaching a screenshot - in IE, Chrome & MS Edge browsers, the optgroup did not display correctly. But it worked in preview & filler, so it depends how you'll be using the form.
-
I was curious so I tried it. See attached (save the file locally, right click and select design to open in design mode, then preview).
-
Interesting. InfoPath doesn't do this out of the box. I don't know if you would be able to customize the view XSL to do this, but it could be worth a try - you can save your form as source files (from the Publish menu) and then modify the XSL. Right click manifest.xsf in the source files and select Design to open back up in design mode.
-
Oh! now I see the issue. I hadn't understood that these links are from attachments to a list item (so we have multiple URLs per item). You could try: substring-after(substring-after(., "Attachments/") , "/")
Then your substring-after returns ListID/FileName.ext and the outer substring-after gets ...
-
Any chance I can see your form? Under the Options tab you can attach a file.
-
If you attach your form under the Options tab in a reply, I'll take a look. I'm having trouble understanding the issue from your description, I'm afraid.
-
This is just a hyperlink in an InfoPath form? Go to Insert > Hyperlink and you can select one field in the data source for the link and another for the display.
-
So - here is what InfoPath is doing. When you re-open a form, if a default value uses a secondary data connection (and the checkbox to recalculate when fields change is checked), the latest data is used in the formula - the fields "refresh". If you change your form to use rules instead, you'll have more control over this - set rules ...
-
I've attached a sample - save it locally, right click on the saved file and select design to open in design mode. There is a filter on the dropdown. Preview and you can see how the entries disappear from the list after selection. :)
-
My guess is that you have used default values in your form's fields? Is that correct? Or are the controls on the form bound to the secondary data connection?