- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
How to create UDT with multiple key fields ?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-26-2011 05:16 AM
Hi,
I want to do some customization in MAS90, for which it is required to create a UDT which has multiple key fields but the problem is that MAS90 does not allow more than one primary key field for a UDT. It is very common in database tables to have composite keys, I am confused why MAS90 does not meet this industry standard... anyway is there any way to accomplish this task ?
Any help would be appreciated...
I am using MAS90 v4.40
Re: How to create UDT with multiple key fields ?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-26-2011 02:47 PM
You are correct, multiple keys in a UDT is not available.
You could use a sequence number as a key then add your fields however they would not be keys.
Dawn
Re: How to create UDT with multiple key fields ?
[ Edited ]- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-28-2011 08:01 AM - last edited on 11-28-2011 08:06 AM
Sorry, I am not familiar with the ins and outs of UDT's. You might try posting this on the Personalization, Customization and Productivity Tools http://community.sagemas.com/t5/Personalization-Cu
Re: How to create UDT with multiple key fields ?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-29-2011 06:14 AM
Skysider,
Just a note. UDT is a User Defined Table and therefore is limited to what can be done to make it easier for a user to create. Although this function could be added it doesn't mean that "MAS90 does not meet this industry standard". It means they do not allow this function in a end user function.
MAS90 does have many Multikey tables. AR_Customer has:
KPRIMARY: ARDivisionNo+CustomerNo
KNAME: CustomerName+ARDivisionNo+CustomerNo
KSORT: SortField+ARDivisionNo+CustomerNo
KSALESPERSON: ARDivisionNo+SalespersonNo+CustomerNo
KTYPE: CustomerType+ARDivisionNo+CustomerNo
KZIPCODE: ZipCode+ARDivisionNo+CustomerNo
KTELEPHONE: TelephoneNo+ARDivisionNo+CustomerNo
KCUSTOMERNO: CustomerNo
KADDRESS1: AddressLine1+ARDivisionNo+CustomerNo
KADDRESS2: AddressLine2+ARDivisionNo+CustomerNo
KADDRESS3: AddressLine3+ARDivisionNo+CustomerNo
What is it that you wish to accomplish with the multikey and maybe there could be another way to acomplish it. Otherwise a developer could assist in the modification you need.
Re: How to create UDT with multiple key fields ?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-29-2011 07:09 AM
As Dawn stated, multi-keyed UDT's are not available at this time. Sometimes you can just create a key field that contain all of these key elements. Create the key as UDTKeyField$ and then read/write to it using all the components of the key concatenated together. Then include the key fields as discrete other fields if you want and need them separately.
Example:
Say, you want to create a UDT by vendor by project. You could create the following in the table:
VdrProjKey$ <----- Primary Key: APDIvisionNo$+VendorNo$+ProjectCode$
APDivisionNo$
VendorNo$
ProjectCode$
ProjectDesc$
Hope this helps
Elliott



