Developer forum
E-mail notifications
Repeated systemNames in Forms for Editors - Dynamicweb 9
Replies
Hi Lara
Thank you for your ellaborate post.
When you use the UI in Dynamicweb to create fields, it will ensure that systemnames are unique. If you choose to overwrite them using the layout dialog we allow duplicates - that is actually a feature and by design. Here is why: We have scenarioes with i.e. multiple fields that shares the same system name to overwrite who receives the form email for one example. And there are many other custom scenarios like the one you have, that will require duplicate system names where custom code is used to pickup the form submit.
When you duplicate (copy field) in the UI, it will add the auto id of the field to the systemname of the field you duplicate.
I've made one change though - I've added the systemname to the list of fields when in list mode making it more simple to see in these kind of scenarios.
Good idea to import/export forms. Should be fairly easy to do. Also an option to deploy forms using the deployment tool.
Thanks, Nicolai
Thank you, Nicolai.
Hello. I Am Getting back to this question because there is a pending issue:
- The fact that, when we change systemName of one field, other fields get their id switched/messed up.
Here goes another video - that i started recording after duplicating a few more fields in the same form.
There you can see that everytime one id is changed, other fields around disappear (which means their id changed)
https://www.useloom.com/share/fa3d8250c6184bdfaf1c0bb24ec1994c
Please take a look into this issue, because we need to make sure that when changing a field, the changes apply to that field only, and no other.
Thanks in advance!
Hi Lara
I am not sure I understand how your video shows that systemnames are changed on other records. It could be you template code...
I've looked at the database for this solution running the SQL scripts below.
The first shows a list of the last edited fields - and as you can see only one field is updated each time you save something. (See dump#1)
If you look at the other SQL, you get a list of duplicate systemnames on that form - you have a couple - not sure that is part of the issue. (See dump#2)
I cannot reproduct systemnames of other fields gets updated when editing another field. You can run this SQL against the field (or fields) that you believe gets altered when you edit another field. Look at the systemname column if it changes when editing another field:
SELECT [FormFieldID],[FormFieldFormID] ,[FormFieldName],[FormFieldType],[FormFieldSystemName],[FormFieldCreatedDate],[FormFieldUpdatedDate]
FROM FormField] where [FormFieldID] = 1
SQL for dump1:
SELECT TOP (1000) [FormFieldID]
,[FormFieldFormID]
,[FormFieldName]
,[FormFieldType]
,[FormFieldSystemName]
,[FormFieldCreatedDate]
,[FormFieldUpdatedDate]
,[FormFieldCreatedBy]
,[FormFieldUpdatedBy]
FROM [FormField]
where [FormFieldFormID] = 42
order by [FormFieldUpdatedDate] desc
SQL for dump2:
SELECT top 1000 [FormFieldSystemName], count([FormFieldSystemName]) as counter
FROM [FormField]
where [FormFieldFormID] = 42
group by [FormFieldSystemName]
order by count([FormFieldSystemName]) desc
You must be logged in to post in the forum