I have two tables with n number of columns out of which mobile number, plan, and amount are common in both tables, we are getting data into tables from two different locations, now i would like to show plan and amount from two tables for which mobile number is same and to be shown in same grid, Can we do this simply without using complex logics and local variables
Discussion posts and replies are publicly visible
Sure, use synced records and create a one-to-one relationship. Then you can easily show all data in one grid.
in both the tables mobile number might repeat multiple times
Well, if there is no clear unique key, it becomes difficult to use record relationships.
Did you consider to create a database view that merges the two tables?
database view merger two tables which means columns i two tables will be shown at one place i.e, mobile number plan and amount columns will be shown twice in the view right? it will not merge rows under one column
Devarneni Shiva Prasad Rao said:mobile number plan and amount columns will be shown twice in the view right
No, that depends on Join you used.
Devarneni Shiva Prasad Rao said:it will not merge rows under one column
Can you elaborate it a bit.In RDBMS Data hierarchy is gonna look something like "TABLE--ROW--COLUMN"
We have below two tables and corresponding record types
So if we open summary view for any one mobile number from any tables supose 1111111111 from table A, we want the below details in readonly grid in that summary view, similarly if we open other mobile number the gird should contain the rows corresponding to that mobile number
Devarneni Shiva Prasad Rao said:I can fetch from both the tables using mobile number and merge them in local variable and can show in grid I think, but is there any other simple solution using Records so that i can use default user filters and search box easily
Just like you said fetching the data back and merge it can do that .Or
Devarneni Shiva Prasad Rao said:open summary view for any one mobile number from any tables supose
On click of Mobile number you want to know the all the plans that mobile number had (which is stored in different tables), Adding a new record object which holds the mobile numbers and creating relationships with the two tables also makes the process easier. (Extra table may be some say it's not a good idea)
I would suggest that you expose both records as APIs and then create a service backed record that calls both APIs and combines them together.