This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

DEVELOPERS FORUM - Program Code --- to select a radii button from the option "BASIS for change" in the PR Form

jacobandrews - Friday, July 19, 2013 4:06 AM:

 

There is a radii buttion called basis for change in the PR form

 

I am trying to automate the option of selecting a radii button of the 2 options :

1. Administrative Hierachy

2. Physical Hierachy

This radii button option is a kind of "List" in the Aras PLM. The List is available in the Admin modules of GUI of the Aras PLM.

My query which Aras API is used for setting the radii Button ---- setproperty, setpropertyattribute or setpropertyitem.

 

 

 



Brian - Thursday, July 25, 2013 10:00 PM:

Hi Jacob,

I presume you want to set the Radio button when the user opens a new PR?

If you always want the values to default to one of the options then you can do this in the Properties tab of the Item type by putting a value in the Default Value column of the appropriate property.

If you have some rules that determine which option is selected then:

In this case you can either write a client method that is called by the PR form using the onFormLoad or onFormPopulated events OR you can set the default values using the Client Methods in the Item Type for the PR using the onAfterNew event.

If you want to set default values using the Client Methods and the onAfterNew event then you use

setProperty.

Your code might look like:

Javascript, Client side.

// some test to determine which way to set the basis

if ( //user belongs to Admin Id then ){

this.setProperty("basis","Administrative Hierarchy");

}

else

{

this.setProperty("basis","Physical Hierarchy");

}

 

Hope this helps,

Brian.