10-17-2018 01:43 PM
I am working with a custom datalist with a selectmany field, and I need the select options to be key-value pairs. Per https://docs.alfresco.com/5.0/concepts/forms-reference.html, "If a value for an option also needs to be specified the "First|1,Second|2,Third|3" format can be used." My question is whether anyone can help me customize my implementation so that the keys (First, Second, Third) are what's displayed in the UI?
10-17-2018 06:34 PM
It is pretty straightforward to create a custom form control that does whatever you want. You can start with the out-of-the-box selectmany.ftl control then adjust it as needed. Have you tried this? Where are you stuck?
10-18-2018 05:32 PM
Hi Jeff,
I have functionality set up so that when a change is made to a datalist, then an API call is made that sends out info on the updated item. As I mentioned before, I have a selectmany in the datalist that I would like to display First, Second, Third, for example, on the form and datalist grid, but then I need the 1, 2, 3 (which represents a UUID relating to my third-party) to be the value stored in the datalist, and subsequently sent over on the API call. Right now, 1, 2, 3 is displayed on the datalist grid as well. So, now that I'm explaining it, I'm kind of thinking I need to change the datagrid view. Does that sounds right to you?
10-21-2018 11:35 PM
It is hard to say without seeing it. I was just pointing out that if the selectmany is not working the way you want it to, you can easily switch it out to be a custom selectmany form control that works exactly the way you want it to.
Explore our Alfresco products with the links below. Use labels to filter content by product module.