Skip to main content
5-Regular Member
Jun 6, 2024 4:50 PM UTC
Question

How to restrict auto numbering for WT Part

Version: Windchill 11.2

 

Use Case: Restricting auto numbering for part creation in windchill rest api.


Description:

Im trying to create a WT part file using rest api.I'm able to create that without providing number property in the request .The part file is created with number generated from windchill. But when I try to provide a value for the property number in the request ,it throws validation error.Can you help me with creating a part file with any number provided in the request.

Error message for reference:

{
    "error": {
        "code": null,
        "message": "The value for Number cannot be changed."
    }
}

3 replies

18-Opal
Jun 9, 2024 9:02 PM UTC

What does your OIR look like?

If you’re using OOTB number algorithm that’s the problem.

 

You need a custom number algorithm for what you are trying to do, which is unique.

 

Based your post it sounds like you want if a number is supplied use it, but if a number is not supplied auto generate it.

Is that about right?

Translate
tarik_perc
14-Alexandrite
Jul 27, 2024 12:05 AM UTC

+ @SS_10923513  REST is just a different way to make the same operations as on the UI, if the auto numbering is set, the field will be grayed out and marked as generated, but you can make different configurations with OIRs

Translate
olivierlp
Community Manager
Jun 12, 2024 3:47 PM UTC

Hi @SS_10923513 , 

Did you get a chance to consider what @d_graham is suggesting? please let us know... 

Translate
Olivier