CoCreate User Forum

CoCreate User Forum (https://www.cocreateusers.org/forum/index.php)
-   Data Management (https://www.cocreateusers.org/forum/forumdisplay.php?f=9)
-   -   Use existing Masterdata attribute to create new one (https://www.cocreateusers.org/forum/showthread.php?t=8328)

m.epp 09-27-2018 07:07 AM

Use existing Masterdata attribute to create new one
 
I would like to create a Masterdata attribute that contains a link to some data in a web based system of my company.

The link would be "http://docsNNN.NNN.com/parts/XXX-XXXXX"

The first part of the address "http://docsNNN.NNN.com/parts/" will always be the same. The "XXX-XXXXX" is the part number and is stored in the Masterdata NAME attribute of the part.

Is there a way to create a smart Masterdata attribute that would take the first part of the address and append the NAME attribute at the end automatically?

We are using Model Manager 19.0M050.95

Thanks for the help.

ludw 10-14-2018 07:08 AM

Re: Use existing Masterdata attribute to create new one
 
1 Attachment(s)
It's a matter of pseudo attribute.
In your custom.xml, for your masterdata class, let add the following pseudo attribute:
...
<Attribute>CUSTOM_ATTRIBUTE
<IsPseudoAttribute>true</IsPseudoAttribute>
<DisplayName>Custom attribute</DisplayName>
<BusinessObjectClass>com.osm.datamgmt.biz.ExpressionAttribute</BusinessObjectClass>
<Expression>'http://docsNNN.NNN.com/parts/%NAME%'</Expression>
</Attribute>

This piece of XML declare a pseudo attribute which value is calculaded as the Expression. The resulting value is not stored in the database, but displayed anytime you're viewing your masterdata.

m.epp 12-05-2018 06:35 AM

Re: Use existing Masterdata attribute to create new one
 
Thank you for your help. I appreciate it.


All times are GMT -8. The time now is 05:19 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.