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

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Need to implement validation on submission of rename if new name is already present

TP_10729144
3-Newcomer

Need to implement validation on submission of rename if new name is already present

Version: Windchill 13.0

 

Use Case: Trying to implement validation on submission of rename wizard if name is already present


Description:

Trying to implement validation on submission of rename wizard if name is already present but not working

6 REPLIES 6
Fadel
22-Sapphire II
(To:TP_10729144)

Hi @TP_10729144 

Do you use a wizard ? and Processor that do what you need?

If so use preProcess method to check if the name already exists in the system and return an error.

@Override
public FormResult preProcess(NmCommandBean nmCommandBean, List<ObjectBean> objectBeans) throws WTException
{
	FormResult formResult = super.preProcess(nmCommandBean,objectBeans);
	formResult.setStatus(FormProcessingStatus.FAILURE);
	return formResult;
}

PetrH

Hi There is no form processor implementation for rename and there is  no wizard page  to handle ok button validation

Hi @TP_10729144 

So you need to write some js script that do what you need.

PetrH

yes  thinking for script or processor implementation but where exactly do i need to implement as I said there is no wizard or proccessor

 

Hi @TP_10729144 

I guess that you are talking about rename wizard, so you need to find the rename table and try to set a JavaScript for the name filed if it changes run a js script that will check all fields on the page an throw alert if there is same name.... 

PetrH

Announcements

Top Tags