cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Translate the entire conversation x

Can we add a prefix to a change notice number generation OIR?

AP_10483126
12-Amethyst

Can we add a prefix to a change notice number generation OIR?

Version: Windchill 13.0

 

Use Case: Can we add a prefix to a change notice number generation OIR? Where the prefix is an attribute from the product context where the CN is being generated.


Description:

Can we add a prefix to a change notice number generation OIR? Where the prefix is an attribute from the product context where the CN is being generated.

ACCEPTED SOLUTION

Accepted Solutions
Fadel
22-Sapphire III
(To:HelesicPetr)

@HelesicPetr To make it work with Prod IBA mapping needs to changed to containerReference^wt.pdmlink.PDMLinkProduct~<ProdIba> 

and the change notice OIR constraint for number need to be set to pre-generated : 

Fadel_0-1760003782196.png

 

 

On the CN create layout we will have the value otherwise with (assigned) we will get an error below 

TTENTION: An object initialization rule could not be applied because an error was detected. Report this issue to your administrator.
 Rule argument 2 is null, please make sure the argument passed is not null, then try again.
Nested exception is: (wt.rule.ruleResource/387) wt.rule.algorithm.InvalidAlgorithmArgumentException:  Rule argument 2 is null, please make sure the argument passed is not null, then try again. wt.rule.algorithm.InvalidAlgorithmArgumentException: ATTENTION: An object initialization rule could not be applied because an error was detected. Report this issue to your administrator.

 

Fadel_1-1760003944485.png

 

 

Fede

View solution in original post

6 REPLIES 6
HelesicPetr
22-Sapphire II
(To:AP_10483126)

Hi @AP_10483126 

OOTB no. 

You can write own function that do exactly what you need by the OIR

PetrH

Another way I achieved this very thing is let the OIR autonumber but first step in workflow was to renumber it.

avillanueva_0-1759923558287.png

This way, the object exists and I can add in other special logic. This calls my own external method. I do exactly what you are describing as I am pulling an attribute value from the product context. I also had a special condition that I want the CR and CN to have the same identifier. 

Fadel
22-Sapphire III
(To:AP_10483126)

Create an alias attribute on CN type to get value from product 

 

 I have made PRD_NAME with mapping  containerReference^wt.inf.container.WTContainer~name : 

Fadel_0-1759929655988.png

 

Use the attribute in OIR as below ; 

Fadel_1-1759929692209.png

 

 

Result : 

Fadel_2-1759929764917.png

 

 

 

Fede
HelesicPetr
22-Sapphire II
(To:Fadel)

Hi @Fadel 

I was sure that the alias attribute is called if it is loading in the html page and could not be used that way..

I hope this can be used also for the IBA attributes. 

So this is very good think to know. 

Thanks.

PetrH

Fadel
22-Sapphire III
(To:HelesicPetr)

@HelesicPetr To make it work with Prod IBA mapping needs to changed to containerReference^wt.pdmlink.PDMLinkProduct~<ProdIba> 

and the change notice OIR constraint for number need to be set to pre-generated : 

Fadel_0-1760003782196.png

 

 

On the CN create layout we will have the value otherwise with (assigned) we will get an error below 

TTENTION: An object initialization rule could not be applied because an error was detected. Report this issue to your administrator.
 Rule argument 2 is null, please make sure the argument passed is not null, then try again.
Nested exception is: (wt.rule.ruleResource/387) wt.rule.algorithm.InvalidAlgorithmArgumentException:  Rule argument 2 is null, please make sure the argument passed is not null, then try again. wt.rule.algorithm.InvalidAlgorithmArgumentException: ATTENTION: An object initialization rule could not be applied because an error was detected. Report this issue to your administrator.

 

Fadel_1-1760003944485.png

 

 

Fede
AP_10483126
12-Amethyst
(To:Fadel)

This solution worked . Thank you.

Announcements

Top Tags