PDA

View Full Version : Problem with One to Many Relation


davisec52
08-16-2009, 10:58 PM
Hi. I was just now trying to create an application in which the file editor object would be the child of a parent file library object. I created both objects. I added both objects to my project. Using the Object Relationship tab in the project, I created a parent-child relationship with the file editor as the child of the file library. The problem is that when I run the software, both objects show up in the left hand menu. I only want the file library object to appear in the menu, and the file editor object to appear ony in the file library. I appear to be doing something wrong. Would anyone have any advice?

Thanks,
Evan

TinkBD
08-16-2009, 11:43 PM
Hi Evan -

I think (and I may not be remembering correctly!) that I was able to accomplish this by leaving the Navigation option blank for the Child Object.

I know that I have also created a Secondary Menu and put objects there, rather than in the Home menu. That way they are accessible as standalones but not cluttering up the Home menu.

HTH,

Tink

davisec52
08-17-2009, 01:44 AM
Thank you very much! Removing "Home" from the navigation line seemed to do the trick.

Evan

davisec52
08-17-2009, 07:20 AM
Thomas,

Another issue has come up with the relational data base function. The problem concerns the one to many relation. what is happening is that although the child object appears in the parent object, the parent object also appears in the child object.

In this case, I'm trying to create a File Library as parent that includes the File Editor child object. When you run the software, the app opens and you see the objects in the left hand menu (if you leave "Home" in the File Editor Navigation field). When you open a new File Library, you see the the File Editor Object. When you open a new File Editor, you see included a File Library. The result of this is that you cannot populate the File Cabinet field, which is a text editor. When you try to make an entry in the File Library text editor, you get a single lline that says, " TigerSoftware.Builder.Client.UI.FileCabinet(c26a31 9a-cffa-40ef-ae4f-01b2f1455fa4. I think the problem is that each object is somehow acting as both child and parent. Any advice how to resolve this?

I have attached a screen shot, as well.

Best,
Evan

TinkBD
08-17-2009, 07:49 AM
I don't know that this is the case, but... in the past when I ran into similar issues when I had LOTS of relationships, if I went thru and doublechekced I would find that I had an error of mine...

Sometimes I had a duplicate relationship and sometimes an extra, reversed one... You might try combing thru yours very carefully and you might find something like that. ;-)

Tink

MikeM
08-17-2009, 09:03 AM
Are you saying you created a text field and a file editor field. The text field is the one (parent) and the file editor field is the many (child)?

Usually when you make the relationship and then run the program and customize the software there is a 3rd field in the window that needs to be removed. Maybe you removed the text field and left that one in. If it is set up as above, I can try and duplicate it. But I can't do it for about an hour. I'll check back then.

TinkBD
08-17-2009, 09:13 AM
Sorry I wasn't more clear, Mike. ;-)

I have put my TSB on hold... waiting for the latest update. I had other projects to work on. so it hasn't been a big deal! LOL

In most of my projects, I am building relationships between complex software objects containing multiple editors...

Anyway, I don't remember any specifics... just that when I DID run into a prob, it was MY fault! :eek:

Tink

TigerSoftware
08-17-2009, 09:57 AM
Thomas,

Another issue has come up with the relational data base function. The problem concerns the one to many relation. what is happening is that although the child object appears in the parent object, the parent object also appears in the child object.

In this case, I'm trying to create a File Library as parent that includes the File Editor child object. When you run the software, the app opens and you see the objects in the left hand menu (if you leave "Home" in the File Editor Navigation field). When you open a new File Library, you see the the File Editor Object. When you open a new File Editor, you see included a File Library. The result of this is that you cannot populate the File Cabinet field, which is a text editor. When you try to make an entry in the File Library text editor, you get a single lline that says, " TigerSoftware.Builder.Client.UI.FileCabinet(c26a31 9a-cffa-40ef-ae4f-01b2f1455fa4. I think the problem is that each object is somehow acting as both child and parent. Any advice how to resolve this?

I have attached a screen shot, as well.

Best,
Evan

Hi Evan,


It is working correctly. It is a one to many relationship which is correct.

If you want a particular field to show up on the child instead of what you are seeing, then set a property editor default check box.

If you don't want it on the window, then take it off using the customization.


Thomas

davisec52
08-17-2009, 07:27 PM
Thomas,

Hi. The problem here is that the parent is showing up in the child object. In this case, I have the File Library parent. The File Library is essentially a text editor that identifies the category of the File Editor. For example, text files, pdf files, html files and so forth. The File Editor provides the actual files. What I want to happen is have the File Editor object show up in the File Library parent. What is happening right now is that the File Library parent is showing up in the File Editor object. A consequence of this is that the File Library, which is the name of the category, pre-populates with with line, TigerSoftware.Builder.Client.UI.FileCabinet(c26a31 9a-cffa-40ef-ae4f-01b2f1455fa4).

How do I keep the File Library parent out of the File Editor child object?


Evan

MikeM
08-17-2009, 08:06 PM
When I created one, I created a txt field and a file field. I made a relationship with the txt field as parent and the file field as child. Running the program, it showed the txt field and the file field in the tabbed window below. When I clicked on the new for the file field, there are 2 fields. The file field and a relationship field, which is the one I think you are seeing. Just drag this field off the customization window back into the customization box. You don't need it visible.

davisec52
08-17-2009, 09:14 PM
Mike,

Thank you for your reply. This sound like what is happening with me. I'll give this a try to see if I can duplicate your results.

Evan

davisec52
08-17-2009, 09:29 PM
Mike,

I'm back. That seems to take care of it. However, I still don't understand why in a one to many relationship, the parent object would show up in the child object. But. I can live with that for the time being.

Thank you again,
Evan

MikeM
08-17-2009, 10:33 PM
Not sure what you mean. After removing the relation link from the customization, mine doesn't show.

Maybe you can make a video?

davisec52
08-18-2009, 07:26 AM
Mike,

Sorry, my last post was unclear. I followed your suggestion and was able to remove the parent object using the "Customize Layout" tool. I just meant that I didn't understand why it would show up in the first place. No problems at the moment--knocking on wood and all that.

Evan

TigerSoftware
08-18-2009, 08:15 AM
Mike,

Sorry, my last post was unclear. I followed your suggestion and was able to remove the parent object using the "Customize Layout" tool. I just meant that I didn't understand why it would show up in the first place. No problems at the moment--knocking on wood and all that.

Evan

Hi Evan,

If you noticed, you can allow your users to create new child records by including them in the navigation on the right. Meaning, you and your users can create a child record without having to enter in a parent.

Say you don't know who the parent is at the time you create your child record. Later you can go back once you know whom the parent is, add the record or select a existing one to relate the two. Once you relate the two, the child will appear in the parents window.


Does that make sense?


Thomas

davisec52
08-18-2009, 08:04 PM
Thomas,

Hi. Yes, that is pretty clear. However, what I was wondering about was why the parent object shows up inside the child object unless you take it out using the "Customize Layout" tool. Anyway, it doesn't really matter now except as an interesting question. I now understand how to get the child object to appear inside the parent object and function correctly.

On a different note, many of my questions could be resolved if you'd simply telepathically implant what you know in my "mind," such as it is. This might work for others, as well. Maybe this could be done on a double opt in basis. Hmm . . . . What do you think?

Evan

MikeM
08-18-2009, 08:15 PM
On a different note, many of my questions could be resolved if you'd simply telepathically implant what you know in my "mind," such as it is. This might work for others, as well. Maybe this could be done on a double opt in basis. Hmm . . . . What do you think?

Ha Ha... As long as he doesn't create a vacuum and suck out what little I have in there :D

TigerSoftware
08-19-2009, 03:21 AM
Thomas,

Hi. Yes, that is pretty clear. However, what I was wondering about was why the parent object shows up inside the child object unless you take it out using the "Customize Layout" tool. Anyway, it doesn't really matter now except as an interesting question. I now understand how to get the child object to appear inside the parent object and function correctly.

On a different note, many of my questions could be resolved if you'd simply telepathically implant what you know in my "mind," such as it is. This might work for others, as well. Maybe this could be done on a double opt in basis. Hmm . . . . What do you think?

Evan

Evan, this gives you the most flexibility when designing your software.

Say you don't want your users to create the parent records from the main navigation. So there is no icon on the right of the program for your users to click on.

The only way they will be able to create a parent is through the child record.


I can't do the chip thing. It would make you dumb if I gave you everything I know. :D



Thomas

davisec52
08-19-2009, 04:14 PM
Thomas,

Thank you. Well then, I'll guess I'll dig in and start learning . . . more. The audacity!

Evan

TigerSoftware
08-20-2009, 12:19 PM
Thomas,

Thank you. Well then, I'll guess I'll dig in and start learning . . . more. The audacity!

Evan

It is for your own good. If I were to transfer what I know it would delete everything leaving you a slobbering potato. Honestly, I have no idea how I am able to even function with what little is in my head.


Thomas