Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Translate the entire conversation x

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

TP_10729144
4-Participant

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)

HelesicPetr
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

HelesicPetr
22-Sapphire II
(To:TP_10729144)

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

 

HelesicPetr
22-Sapphire II
(To:TP_10729144)

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