So I created a new Doctype named Guests which has a simple form to fill in some information.
The Guests doctype is set as a table in Event doctype and is basically filled in from there. However, the table field “name” I would like to make it searchable to be able to create new names or search and select already existing ones.
That’s for basic links but I want to do something else.
In the Event doctype, the table is already a link to the Guests. The guests details are added when creating an event. The text field “name” appearing from Guests must be searchable … so the link must be from inside the event doctype
So I am thinking if there is a specific code to add to be able to link a specific field from an already linked table in a doctype.
I hope I make sense what I want to accomplish haha
The problem with creating another Name doctype is this:
The data is entered from within the Event doctype - the employees will never enter the data from within the Custom Doctype.
So if I make another name doctype, how do I link it inside the Event doctype as well ? Also, in the Event doctype I would like to automatically fetch specific fields related to that specific “name” record previously added
That’s because you have many-to-many relationship between Guest and Event. You have to create an additional linking table to model this relationship. Then, when you create a new Event you will be filling this new link table on the Event form with the Guest data you will be able to search for or create anew.
The problem will be your buisiness requirement that your employees shoud only be able to fill in the Guest data from the Event form. You will need to write custom logic, which will intercept the data you enter in the link table on the Event form and will handle creation of the new Guest entries without redirecting the user to the Guest entry form.