Multi dimensional Record Type

Certified Senior Developer

Hi Everyone,

Is that possible to store Multi dimensional of a record type?

I have a requirement where i need to store like  below

a[1][1]=2,

a[1][2]=3,

something lie this,With CDTs i see it is straight forward but when i am using with record type to save a[1][2]

it is showing below error

 .

Am i missing anything?

Can someone please help me on this?

  Discussion posts and replies are publicly visible

Parents
  • A recordtype can be thought of as a map to or an overlay on a database table. So you need to work your way backwards from the table design to the recordtype that maps to it. You could have a a table that has 3 columns. The first column will be the first dimension, the second column the second dimension and the third column the actual value. So example rows for your examples would be:

    1, 1, 2

    1, 2, 3

    If the only attribute you're interested in is 'a' then the whole table could be considered to be a 2-dimensional store for the attribute 'a'.

    If you need more attributes you could add another column to store the attribute name in e.g.:

    a, 1, 1, 2

    a, 1, 2, 3

    You could normalize this model and use one table to hold the attribute and the index for the first dimension and then have the second dimension in a separate table and relate the tables using a foreign key. 

    In short: design your table(s) to meet your needs and then implement your records to map to the tables.

Reply Children
No Data