Cancel
Showing results for 
Search instead for 
Did you mean: 

initial value for runtime property

Creator
Creator

Hello,

Is there any way to give intial value to a runtime property in ID generation rule?

Emre
TUSAS Engine Industries, Inc.
8 REPLIES

Re: initial value for runtime property

Gears Phenom Gears Phenom
Gears Phenom

Can you explain what you are trying to accomplish? Did you set up a custom ID Generator Business Object, or using the OOTB to use with the ID Generator Rule? I've done a very complicated ID Generator that is 5 parts, middle is a counter and it is all controlled by conditions. I can try to help you but I need to know a little more of what you are trying to get out of the ID Generator.

 

Jamie Griffis

Mercury PLM Services

Re: initial value for runtime property

Creator
Creator

Hello James,

I try to create item with intelligent part numbering such as PR01-FN-1250-HPT-190118-123ASD4.

Here i couldn't get how to add seperator of "-" between the other properties.

I created a property with a classic LOV with only one value of "-".

I add and dublicated that property between the other properties on Conca Rule window.

so in Create new item window when pick "-" value for that seperator property. i can have the ID above. but if i can define "-" values as initial value, i don't need to pick "-" value each time while creating new item.

 

if it is not clear i can send screenshots.

Thanks for your help.

Emre
TUSAS Engine Industries, Inc.

Re: initial value for runtime property

Solution Partner Valued Contributor Solution Partner Valued Contributor
Solution Partner Valued Contributor

Hello

 

What if you add "-" in your lov value?

For example for the starting code you will have this values : "PRO1-" "PRO2-"

For the middle code you will have:"MID-"

For the properties that define the end of your code you will have: "END"

 

Does this helps you?

Re: initial value for runtime property

Creator
Creator

Hello,

 

I also think to add "-" to LOV values but there are two properties without LOV. users fill those property's value manually.

Here, it is hard to manage the users to add "-" while typing those values. Nothing stop or warn them if they forget to add "-" to end of the value.

Emre
TUSAS Engine Industries, Inc.

Re: initial value for runtime property

Gears Phenom Gears Phenom
Gears Phenom

I understand the issue, I think. I don't know of if it is possible to set that initial value for these. I had similar issue but I didn't add extra properties for the "-" when I needed it. I just added the "-" to my LOV values as needed. You can only have one counter in the rule but you can add "-" to it.

 

Mine ID was like:

"Prop1-""Prop2""-nnn""Prop3-""Prop4"

A-1234-873B-003

 

My tricky part was the combo of Prop1 & Prop2 had to generate a unique counter. I ended up with almost 1450 concatenation rules and 1450 conditions to acheive this. I was a bit worried about performance but so far I do not see any in the RAC. The only down side is these ID Generators do not work in CAD integrations interface.

 

Jamie

Re: initial value for runtime property

Creator
Creator

I think it is not possible to define initial value for runtime attribute.

 

Contour would be my second question.

How did you make it (the combo of Prop1 & Prop2 had to generate a unique counter.)?

 

LOV 1 = A,B,C for Prop1

LOV 2 = X,Y,Z for Prop2

Counter = NN

 

is it possible make AX01, BX01, CX01 etc. automatically?

Emre
TUSAS Engine Industries, Inc.

Re: initial value for runtime property

Gears Phenom Gears Phenom
Gears Phenom

I've not tried to do anything automatically. For my requirement the user will select the 4 different combo's of LOV values needed for his/her Item ID. The ID Generator will then assign the next available number with the counter included.

 

Here is where it gets complicated. I couldn't use one rule because I needed the counter to be unique for any combination of Prop1 & Prop2. So I had to duplicate the rule to add a condition for each combination and this is why I ended up with 1450 rules & conditions. You can create the condition new as you create each rule and that makes it easier. You can copy and paste one condition and modify the LOV values to save time instead of doing it manually each time. 

 

My condition expression syntax was this format:

o.PropertyName1 = "LOV_Value" and o.PropertyName2 = "LOV_Value"

PropertyName1 & 2 is the property on the ID Generator you are setting with the concat rule.

The "LOV_Value" is a unique value from the LOV. 

 

This is what the condition will really look like using your actual property names and LOV values

o.xy7_ProjectLetter = "A-" and o.xy7_Code = "1234"

 

 

Jamie

 

 

Re: initial value for runtime property

Creator
Creator

Jamie,

Thank you for your help.

Emre
TUSAS Engine Industries, Inc.