Multiple columns from other table

I have 2 tables. Biodata and attendnace. In Biodata, I have personal info. Now I want show some columns like name, emaild, designation from one table and in-time, out_time, shift and many such columns frkm other.
SetRealtion only allows to map it with one column. I want them separately so that we can use for searching amd sorting.
@johnny - Please guide how to achieve this.

2 Likes

Hello @kapilchugh ,

Just to make sure that I understand correctly you are most probably looking at a 1-1 relation. So for example the edit form will look more or less like this:

First Name: (from biodata.name)
Last Name: (from biodata.last_name)
Email: (from biodata.email)
Designation: (from biodata.designation)
In-Time: (from attendance.in_time)
Out-Time: (from attendance.out_time)
Shift: (from attendance.shift)

If thats the case then unfortunately I don’t have yet this functionality but to be honest I was looking forward for someone to ask for it since this involves lot of work on my end (there are many scenarios to cover). If what I am describing above is what you need, the only thing that I can think of for now is to Create A VIEW table which you will have the joined table and then call the VIEW table instead. Then to use callbackInsert and callbackUpdate to do manually the insertion and the update of the fields.

Let me know if that work-around fits your needs and also if there is time for this so you can wait till I have this functionality ready. Currently the next priorities for the next version are:

  • Create a new field type “fake” (by the way I just released today the new page of field-type)
  • Have the ability to add placeholder with a description to the inputs
  • 1 to 1 relation but it is a bit tricky but I can give it a try if this is a priority in general
  • Create a Model Generator for custom queries

Regards
Johnny

Hey @johnny
Yes, your understanding is correct. If there is gonna take time, I can create VIEW and move ahead.
Eagerly looking for new release.