Nesting a Sub-table into more than one sheet!

Dear Ragic, Community,

I would like to share with you that my work using Ragic for my family’s real-estate business has been the most enjoyable experience, thanks to Ragic…

Also, today I would like to also share with you my finding concerning the:- “Nesting the same sub table into two separate sheets”.

Now, if and when the need arises for you to do the same, you would likely be able to figure this out for yourself, on your own!

So then, it actually may be best for you to go no further with this from this point on, i.e., if you are one of “those people” like myself, that get a real kick out of learning Ragic all on your own!

I know I do!

So, beware! And most of all don’t say I didn’t warn you!

“Life is like a box of chocolates, you never know what you’re going to get.”

Ok, so you have probably already learnt how to create a sub table either by including one with new field entries directly into your form, or by simply embedding an existing sheet into your form as a sub table! If not, then please see here…

https://www.ragic.com/intl/en/doc/7/Subtables

Now, in order to nest a sub table into to separate sheets all you need to do is just that, either you start by creating a new sub table into an existing form design, like I said above, by entering a series of new fields to create a new sub table (as shown in the instruction guide above) or as I have also stated, by embedding an existing sheet as a sub table in one of your form designs. Note: When I say embedding, I am referring to the “show references from existing sheets” feature available in the Form Tools menu, when in Design Mode. This too is explained in the instructions guide given above. I hope not to confuse anyone…

Now, if you have employed the first option given, and created a new sub table rather than having embedded one, then you will need to use the “new sheet from sub table” feature also found in the Form Tools menu, to, like it says, create a new sheet from the newly created sub table.

In_fact, Ragic provides a whole lot of information about sub table worth checking out found at that link at address. Such as information about linking regular fields found in the paretn sheet back over to the newly nested sub table sheet to appear there as well. I hope you check it out, as you can imagine, it’s always a good idea to read through all the learning information provided at the learning center, at some point at least! I found that process enlightening, and most valuable, and have done almost two complete read-throughs now! And will endeavor to do it again as new features are added to Ragic! The whole process is so much fun. lol Really!

Now back to the nesting of sub tables…

We just completed the first part, by nesting the first sub table, and ready to nest the second. As already implied, it’s straightforward, and pretty much the same as before, except we cannot create a new sub table, but can only add an existing one, and as indicated, this may be one that need be created!

So either way we will now be able to embed the existing sub table sheet, into the other alternate sheet, so that the sub table will appear there in that sheet as well. To do this we simply use the same feature mentioned above, i.e., “Show references from existing sheets”.

Now, here is where we get to the intriguing part, that I thought I would like to share with you!

In order for records to appear in both sheets that have the same newly nested sub table, we have to first consider that in each sheet’s newly nested sub table, there would need to be a field to capture the other/opposite sheet’s Key Field value as well. i.e. If entries are to be made into both sub tables, otherwise you will only need to include the other/opposite sheet’s Key Field into the sub table where the entries are to be made. In this case you can then set the other/opposite sheet’s sub table “read only” as you won’t need or want to make entries there.

And remember and be sure to make this use of these additional fields a mandatory entry by selecting “not empty” in field settings panel in design mode.

To add these fields, as they are necessary, you will usually be able to simply click on the sub table name either being listed under the “show references from existing sheets” or the “new sheet from sub table” feature listed in the Form Tools menu, as per how we have just completed utilizing those features.

And there you will be able to adjust the available fields, as the newly added ones, will make themselves available automatically, but only when the sheet is created from as sub table, and not when a sub table in added to a new sheet, just so.

And, there may be even other similar instances where this applies, and you may need to be aware of, like say if you are embedding into more than two sheets, you may require deleting the existing, and recreating a new sheet, which when you do, Ragic then automatically allows you to add the parent sheet’s key field to the newly created sheet when it is being created.

I can’t help but wonder here if Ragic can open this up and allow for this key field allocation to be done manually as well, or rather instead! Anyway!

So then, if you re-embed a sheet into the same sheet, the key field will be included in the new embed if it was not previously there, however at this point, you have through that it may be simpler to just add a new field to the sheet, and then it will automatically become available in, and can be included in the original sub table, however this is not the case, as the system will not recognize it as a system generated field. So, in other words, you will need to regenerate the sheet from the sub table, and re-embed it as well, if it was nested from an existing sheet! Good luck! LOL

I really hope I got all that right, as I am only now trying to do this in my own DB at the moment!

I found that most enjoyable, and then though that it may be a good thing that we may all “come across” at some point, and so therefore also a good thing to share with others here too!

If anyone at Ragic would like to correct anything I’ve written or add something! Please do, as you know it would be most appreciated and welcomed! Lord knows that I’m only now tinkering with this Ragic capability!

Thanks, and best of luck with Ragic! Tis my saving grace!

Kane

1 Like