cancel
Showing results for 
Search instead for 
Did you mean: 

Can I have 10 same fileds in all my 6 custom Types

bisana
Champ on-the-rise
Champ on-the-rise
Hi
I am creating a demo for a real esstate company. They have around 30-40 folders, and the have 10 fileds to fill in.
Now the challenge for me is that, this 10 fileds are there in all the documents, but for different directories, some of the fields are mandatory and some not. When I had made the list I found that there are around 6 such comination. for eg for first folder, fiied 1,2,3 are mandatory and others not
For second folder field 3,4,5 are mandatory and other not, like this I have 6 combinations

Now in my mind, I plan to put the demo as follows, I will have 6 custom document types, where I define the field properties as mandatory or not.
If I do like this, 10 fileds will be in all six document types and will this repetation is allowed in Custom Type creation .
My ten Custom Type fields are
    Building
    Location Code
    Lease Start Date
    Lease End Date
    Customer Name
    Shop Name
    Customer Number
    Lease Number
    Issue Date
    Document Description
Guidance and Advice requested
5 REPLIES 5

mrogers
Star Contributor
Star Contributor
I suspect you may be better off modelling these as aspects.   If something is optionally mandatory then that's a hint that the model is not quite right.

Without knowing too much about your requirement the following is only a rough sketch but it looks like your base type is building.   You may want a leasable aspect To hold lease details.   It sounds like you may have identified your other aspects as well.

bisana
Champ on-the-rise
Champ on-the-rise
Hi mrogers
Thanks for the advice.
I am bit not clear with
If something is optionally mandatory then that's a hint that the model is not quite right.

Also If do cusomt aspects, I have lots of codes going into share-config-custom.xml, I am trying to simplify, not sure what I think is a good idea
Thanks
Joseph John

mrogers
Star Contributor
Star Contributor
"if it's optional AND mandatory" then that's clearly nonsense.     It may be indicating that there is something in your model that is not quite right.

On the other hand when stuff "just works properly" then it is a good sign that your model is correct.

bisana
Champ on-the-rise
Champ on-the-rise
Hi Mrogers
I underdstood, also I  came to know that a filed cannot occur in more than one in Custom Aspect or Custom Type, ie I cannot define the same filed in more than one place. After lot of thinking I was not able to come up with a model. First I thought I will have different aspect with all the fields and we define which we want mandatory or not . This way of thinking did not work since the occurance of fiedls cannot be repeated.

I am thinking hard to create a model with fields, I am giving my needs here, so to get advice
    (1) Building
    (2) Location Code
    (3) Lease Start Date
    (4) Lease End Date
    (5) Customer Name
    (6) Shop Name
    (7) Customer Number
    (8) Lease Number
    (9) Issue Date
    (10) Document Description
MyDM  folders should have  the following properties
    Some folders have Field 1 and Field 9 to 10 Mandatory
    Some folders have Fielf 1, Field 2, Field 9 , Field 10 Mandatory
    Some folders have only Field 9, Field 10 mandatory
    Some folders have only Field 1 mandatory
    Some folders have all the field mandatory
I tried hard to design a model which will help me to full fill the above requirement.
It will be great if I could get advice

abarisone
Star Contributor
Star Contributor
Hi bisana,
in my experience I designed a model with all the custom types I needed applying the correspondant aspect to each.
Then, since I used a rich client application as a frontend, I put there the info about which field was mandatory or not.
You should never declare a property or aspect mandatory because it my lead to integrity issues.
Another approach would be to put a property file on the server side and with a Java backed webscript create your form getting properties and aspects from the model and applying a second layer of 'security' at this level scope in order to verify if your constraints have been satisfied.

Regards,
Andrea