Service Desk Practitioners Forum
cancel

SD Generic Relations and Sub Forms

SOLVED
Go to solution
Highlighted
Michael Daly_2
Super Contributor.

SD Generic Relations and Sub Forms

Hi all

I want to add a field called "Billing Ref:" which is the sole field on a Sub Form I have created to my main Change form when I change the value of a custom field I created called "Customer". This 'Customer' field on my Change form is a custom Organisation lookup reference field. I have created an Insertion Point on my Change form where I want the new field (Billing Ref:) to appear only if I enter a specific Customer's name in the Customer field.

My problem is trying to understand setting up Generic Relations and a UI rule for adding my new subform (with field Billing Ref:) to my main Change form when a custom field (called Customer) on my Change form changes to a specific customer.

I have created a new Generic Relation Type but I think it's all wrong. There is NO help when you click [F1] and I don't fully understand how the items in the drop-down list for the "From Item" are chosen. I cannot find any reference to my custom field on my Change form called 'Customer'. I'm still not sure why this has to be so convoluted to add this subform to my main form. What are you supposed to put in the 'From Item' field, and what item do you put in the 'To Item' field.

Obviously you have to get this correct because when I have been trying to create the new UI rule to add a SubForm I click on the [Source field] button and nothing happens. It's very frustrating. According to the notes I have read when you click on the [Source field] it brings up what you entered in the [From Item] in your generic relations type.

I have read all the explanation documents that came with SD-20 such as the 'Generic association mechanism' document and 'Dynamic form' documents but these are all but useless with a lot of screen shots but little substance to make this process work. They don't explain how the list items are in the drop-down lists on these forms and what happens when the fields are not there.

Can someone please explain in simple terms whether it works with custom fields on a Change form?

Many thanks.

Michael Daly
3 REPLIES
George M. Meneg
Acclaimed Contributor.
Solution

Re: SD Generic Relations and Sub Forms

Hello Michael,

Generic relation is not used to link fields, it is used to link entities. These entities are presented when you press "From Item" and "To Item".

In your case, From Item should be Person and To Item should be the Form. Then, press Add... to add Relations for this type. From should be the person you are interested and To the subform.

There you must add All persons for whom you want to use this subform. Unfortunately, since Generic Relations don't support Data Exchange (What the hell had in mind HP engineers when designed Generic Relations?) you have to enter these relations one by one.

Then use ui rules to instert the subform according to the person to form generic relation.
menes fhtagn
Michael Daly_2
Super Contributor.

Re: SD Generic Relations and Sub Forms

Thanks George.

You are a legend.

I'm still not crystal clear on how it all works as I have had to 'hard code' the 'Customer (Organisation) name' in the 'Generic Relation' rule and I think that is very bad programming. It should all be data driven from the 'Customer' field on the Change form.

At least I now have it working so thanks again George. I wish HP could make this task a lot easier, and if nothing else hire some MUCH better writers for how their software works. Maybe they wouldn't need them if their software worked more intuitively with 'context sensitive' help.

Regards

Michael Daly
26 March 2007
Robert S. Falko
Acclaimed Contributor.

Re: SD Generic Relations and Sub Forms

Michael,

Yes, you have to hard code. Therefore, it would make sense to make a generic relation between the subform and an attribute of the organization, rather than the organization itself. This will give you much more flexibility in the future. The organization category is probably a good bet, although you can imagine another field, if required.

It is important for the purposes of performance to keep the list of relations as short as possible for any given generic relation type.

-Josh