Validate text field

Greetings everyone!

I am developing a database where japanese people is the main user. I have in my form a field named, “name”.

I need to validate if the inputted value in that field is a japanese character(hiragana, katakana or kanji). If so, a message should display informing that only alphabet input is valid.

My question is, is there a way in Lotus Notes that I can use to determine if the inputted value is in japanese (double bytes)? We have just upgraded from Notes7 to Notes 8.5

Any idea/suggestion/help about the subject is very much

appreciated =)

Maraming Salamat po!

Thank you very much!

Best regards,

O. S.O

Subject: validate text field

If I read you correctly, you want to enforce ASCII/prevent hiragana/katakana/kanji? If that’s the case, then you could check with @Ascii in Formula Language or the Asc function in LotusScript.

If you want to make sure that hiragana/katakana/kanji are used, then you might be able to kludge something using the Uni function in LotusScript, but Java would probably have a better library (though validating user input using Java is a bit convoluted since it can’t access the front end).

Subject: RE: validate text field

Hi Stan,

Thank you for your reply.

Yes, that’s actually what I’d like to do. I’ll see what I can get on your suggestion and post here the update.

Thanks again!

Subject: RE: validate text field

follow-up…

the following codes does what i needed to do:

FIELD inputVal := @Ascii(@GetField(“name”);[AllInRange]);

@If(inputVal =“”;@Prompt([OK];“エラー”;“ロマ字のみ入力して下さい。”);“”)

but i wonder why i get a value of 1 in my name field after the message displayed.

do i miss something here?

Thank you very much for the help! :slight_smile:

Subject: RE: validate text field

My guess would be that you have that in the Input Translation event. It should be in the Input Validation event, with @Failure instead of @Prompt and @Success instead of “”.

Subject: RE: validate text field

Wow…you’re right. And it worked!!Thank you so much for the help!

God bless! =)

Subject: RE: validate text field

Hi,

I have encountered this: The message is supposed to display only when name field is inputted with japanese character but what happens is that even I just select other object in the form, the message pop-ups telling me to input alphabet only in name field. No value yet is inputted in name field, I just tried to manipulate other object in the form.

Any work around this case?

Many thanks!

O.S.O