Hello,
I have the following requirements:
Regards,
Novi
If there are Accepted Answers, those will be shown by default. You can switch to 'All Replies' by selecting the tab below.
Hi,
Your use case isn’t entirely clear, but my recommendation is to work on the backend rather than the frontend. If you implement the conversion on the frontend with JavaScript, you’re relying on the browser, which isn’t something you can control 100%. If you have AnswerModules' ModuleSuite available, you can write code similar to the following in the Content Script controller of your Beautiful WebForms:
def monthToRoman = [ "January": "I", "February": "II", "March": "III", "April": "IV", "May": "V", "June": "VI", "July": "VII", "August": "VIII", "September": "IX", "October": "X", "November": "XI", "December": "XII" ] def convertMonthsToRoman(monthNames) { monthNames.collect { monthToRoman[it] ?: "Invalid month" } }
By doing this, you can ensure that the code is executed exactly how, when, and where you want (and you won’t need to rely on OScript and you don't even have to deploy anything).
The same applies for the incremental ID. ADN is available only in certain flavors of xECM, and if you don’t have it, you can create a field based on a value stored in the database and increment it using backend mechanisms (again, with very simple ContentScript). These mechanisms would account for race conditions, simultaneous access, and all best practices for parallel access to the same unique resource by different threads.
Once again, if you handle this on the frontend, it’s a sure recipe for disaster.
Jacopo Malnati
This would require a change to the code formatters, if you trace the code from ?func=admin.dateformat you can find where the formats are used and then trace them to where they are used in the utils methods.