Change name of the document where the data is stored when webform has been submitted - erpnext

When an user submits a webform, the data is stored in a document with a random ID like "5c58393da6". Is it possible to give the document a name, for example use the input in one of the form-fields as the name?
Thank you in advance!

Related

TYPO3 TCA fill in a field with the year of creation and the UID

I have created a new field in the TCA. This is now empty. Now I would like to fill this in with the creation year and the current UID when creating the data record or afterwards.
Do I have to do this via hooks or tasks?
As the uid of a new record is unknown until the record is saved there could not be a prefill.
Of course you could create a scheduler task to set a field with the value from the creation date (field cr_date) and uid regulary.
But a better solution would be a hook after the record creation as it would be less overhead.
On the other side: as the relevant data already is stored in every record (cr_date and uid):
do you realy need another field with the same information?

Odata results displaying user id values under certain columns instead of usernames when data imported into excel from devops?

I imported certain Workitems data from my Devops project into excel using Odata queries.
In that data under certain columns for eg: AssignedToUserSK its showing the user id values like this 06ea0e70-432d-4315-8ffd-87706966a7b6
Instead of this i need the username to be displayed instead of user id.
How to solve this?
If you want to see usernames in the Odate query instead of user id, you need add the columns AssignedTo.UserName, CreatedBy.UserName and ChangedBy.UserName. Then you can see the user name.
Result:

ChoronoForms v5 dropdown field dynamic preselection

My question is a very simple question:
I want to preselect the single data stored in a previous form in a dropdown field of a form (chronoforms v5).
In other words: In the previous form user has chosen 'New York' from a cities dropdown field.
Next time the user enters in the form he has to see the dropdown field positioned to the city of 'New York'.
Any suggestions?
Thanks a lot
Assuming that your users are registered and logged in them you can save the User ID and the selected value to a database table in the first form; then in the second form use a DB Read action in the On Load event to recover the saved value.

How to retain the value of an editable text field in a Lotus Notes form every time the user opens it?

I have a form in Lotus Notes containing an editable text field.
Once the user enters a value in that field, it gets saved properly when I check it by opening the document from the back-end.
But I need this value to be seen in the form every time the user opens the form.
Because it is a configuration form where the user should be able to see all the values saved.
For example, a field which contains the path to download a report. And it should be an editable field itself. Is there any way to do this? Any sort of clue or help would be really appreciated. Thanks in advance!
The value of an editable field stored in a document does keep it's value every time the user opens the document.
It sounds like you may ask for something else. You want User A to create a document, enter a value (i.g. a download path) and save the document. When User A or User B later creates another document based on the same form, the previously entered value should be the default. Is that what you mean?
In that case you could simply use #DbLookup or #DbColumn in the formula language in the Default Value property of the field.
Or create a lookup view with the previously created document, sorted descending by date, then use the GetFirstDocument method of the NotesView class to get the first document in that view and read the value out of it using the GetItemValues method of the NotesDocument class.
Performance tip: If you make sure the value you want to look up is visible in the lookup view you can use the GetFirstEntry method of the NotesView class, then use the ColumnValues property to get the value, this is much faster.
Solution is to use #DbColumn in the default value of the editable text field of my form

Get document ID for the template - Orbeon

I want to get the meta data from the template form. On the template form we have set meta data for some fields. We need this meta data to create a object which contains both the meta data, and the data that has been filled out, and create an object that contains these data.
When a user fill out a form, we only get the data a user has filled out. How can we achieve the meta data from the template.
In our database, I can see both the template and the filled out form have an unique ID, how can I pass this ID for the template, so I will receive it when the user has filled out the form, so I can look up the template form, and get the meta data?
Is there a way to get the ID for which template has been filled out? or can I pass the ID with the XML file, containing the filled out form?
The webservice is in grails (JAVA).
Best Regards
Daniel Knudsen