SOLVED: How to change field-type of existing metadata fields?

OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules
Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
Post Reply
OpaHeinz
Junior Boarder
Junior Boarder
Posts: 26
Joined: Tue Jan 29, 2019 11:31 am

SOLVED: How to change field-type of existing metadata fields?

Post by OpaHeinz » Wed Feb 06, 2019 3:50 pm

Short explanation:
For the moment, to add invoice documents I use a textfield in metadata to enter and store supplier names.
Now I uploaded a couple of invoices and assigned my metadata to it which means I assigned the supplier name and number in the described textfield.
so far so fine

Now I would like to change my textfield in a field which delivers suggestion out of still existing suppliernumbers.
Would this be possible?
If yes, how?

I assume, that I have to
1) read my still existing "supplier name" field and deliver a unique and alphabetical ordered list
2) provide this list in the metadata input mask as a selection

But what is, if I have an invoice with a new, for OpenKM unknown supplier?
In this case I should enter it again as a text....

It would be great If I could get some hints or used scenarios

Thank you in advance
rds Heinz
Last edited by OpaHeinz on Tue Feb 12, 2019 9:09 am, edited 1 time in total.

jllort
Moderator
Moderator
Posts: 10455
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: How to change field-type of existing metadata fields?

Post by jllort » Fri Feb 08, 2019 7:26 pm

I think you are looking for enclosed list, I think a good option for you might be suggestion field : https://docs.openkm.com/kcenter/view/ok ... field.html

OpaHeinz
Junior Boarder
Junior Boarder
Posts: 26
Joined: Tue Jan 29, 2019 11:31 am

Re: How to change field-type of existing metadata fields?

Post by OpaHeinz » Sat Feb 09, 2019 7:21 pm

Yes, I still had a look on it.

Until now I had view hundred documents with assigned supplier by a text field.
Can I change the fieldtype for the existing/ still assigned documents?
(I don't want to loose the still assigned data)

Thank you in advance
rgds
Heinz

dferguson
Expert Boarder
Expert Boarder
Posts: 120
Joined: Thu May 18, 2017 12:48 pm

Re: How to change field-type of existing metadata fields?

Post by dferguson » Mon Feb 11, 2019 5:10 pm

You want to change documents with "text field data" to the equivalent which are now listed in a select list?

How about finding all the documents by group name of the text filed with a SQL query? You could then update the group name with the new group name and value. Write a script or other external program to sort based on text field value and apply the new value to match.

OpaHeinz
Junior Boarder
Junior Boarder
Posts: 26
Joined: Tue Jan 29, 2019 11:31 am

Re: How to change field-type of existing metadata fields?

Post by OpaHeinz » Tue Feb 12, 2019 9:00 am

yes, i did it now similar like you described.
Thank you for your help!
rgds Heinz

jllort
Moderator
Moderator
Posts: 10455
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: SOLVED: How to change field-type of existing metadata fields?

Post by jllort » Wed Feb 13, 2019 7:40 pm

If you are playing in a production environment I suggest a backup.
Also, a good practice might be playing with another environment ( cloned production or OpenKM personal development environment and from there play safely ).

Post Reply

Who is online

Users browsing this forum: No registered users and 9 guests