CustomID/Tag Field on forms

tbalestreri3
Mega Contributor

I am adding a Custom ID/ TAG field on all of my forms. This will allow users to tag their submissions giving them another way of filtering/reporting. When a user adds a string to this field and submits the form I would like this tag to be added to a database. I would also like this field to reference this database so users can see what other people have used as tags as well as easy access for remembering their. This functionality is sort of like the tagging on the Live Feed plugin.

Is it possible to add strings to a database via submit on a form?

Any help would be much appreciated.

Thanks,
Tony

4 REPLIES 4

Chuck Tomasi
Tera Patron

Very interesting idea. The simplest approach is to just let users manage comma (or space) separated values in your custom field. Ex: mail,outlook

Create another table to maintain the values in that table against the task (or other record) that you want to search later. Perhaps two fields. One for the sys_id (or document ID) of the record referenced, and another with the tag.

A simple query for records containing your tag would help get them in the direction, although variability is always fun. Do you want to get in to partial words if someone is looking for "look" and the tag is "outlook"?


Hi Chuck - Thanks for the quick response!

My main concern now is how to get the strings from the tag field into a database that I can later reference. People will be making up their own tags. For instance someone might insert "RAD" as their tag. If RAD is not in the database that this Custom Tag field is referencing I would like it to be added. If "RAD" is in the database the field is referencing I would like it to just be used. How would you insert new tags into the system through the field?


I think that look to find outlook search is nice as well but I would like to get this other situation figured out first.


Here's how I see it (very similar to live feed tag concept):
Table: u_tag (u_tag_name, u_count)
Table: u_tag_record (u_tag [reference], u_document [doc_id, dependent on u_table], u_table [table of doc_id])

You'll then need business rules to:
* get the tag(s) from the record
* see if the tag exists already in u_tags, create if needed
* see if tag_record relationship exists yet, add/remove tags for this record when tags are added/removed
* update tag counts if that's important

There's quite a few pieces involved so I can't give you all of the details but the logic shouldn't be too complicated.

BTW, we've thought about and tested global tagging concepts in the past and will eventually come out with something, just can't say when.


tbalestreri3
Mega Contributor

Anyone else have any more information on this?