Lotusscript to find a numeric charactor

Hello, hope someone can help;

I am trying to create an If statement:

If field has number with an “R” in this place:

XXXX-XXXX-RXX

If the “R” is not there then nothing happens.

If the “R” is there two radio buttons will appear on the form. One button(No) when selected, would email a person a reminder. The other is merely a “Yes” radio button.

I am uncertain on how to “strip” or “count” the numbers for this to happen.

I hope to do this change on one form and not have to create views if possible.

Any help is greatly appreciated…

Thank you

Subject: RE: lotusscript to find a numeric charactor

Please look in the designer help and search for Instr or Mid, depending on your needs.

Subject: RE: lotusscript to find a numeric charactor

sorry…long day…found them, Thank you!

Subject: RE: lotusscript to find a numeric charactor

Thanks Walter,both of those bring no results in Designer help.

Subject: RE: lotusscript to find a numeric charactor

Gary, it actually sounds like what you want to do is hide the buttons if that field is blank or does not match the specification you gave of XXXX-XXXX-RXX (actually, I think it should have been specified as NNNN-NNNN-RNN, where N means numbers, but that’s just my thought.)

If it does match, then the buttons would display.

Anyway, if this is the case, then you could just use @Matches in the hide-when formula, such as

!@Matches(fieldname;“{0-9}{0-9}{0-9}{0-9}-{0-9}{0-9}{0-9}{0-9}-R{0-9}{0-9}”)

so, with this, the buttons would be hidden if that formula was true, but displayed if the string in fieldname had that pattern.

Subject: RE: lotusscript to find a numeric charactor

Thanks Jerry.I tried that and it displays a “1”.

I want it to display a button or checkbox.

Not really sure how to add that in the code you posted.

The field (PartNumber) can contain any amount of numbers or text. I want the box to display only for the 11 digit number in the format:

NNNN-NNNN-RNN

Thank you for your help.

Subject: RE: lotusscript to find a numeric charactor

Ok, I believe you said that you have two radio button fields, a Yes button and and a No button.

Those fields should be defined on the form. Use the Hide-When property for that paragraph on the form to hide or display the fields based on the value of the other field meeting or not meeting the criteria of the formula I gave you.

Subject: RE: lotusscript to find a numeric charactor

Trying to pinpoint how “Hide When” would fit into the declaration paragraph. The help guide has everything from web browser to mobile account help for Hide When…Sorry, I am just learning Lotusscript…

Subject: RE: lotusscript to find a numeric charactor

Gary, what I was describing was not a LotusScript solution, but something on a form. I was under the impression that you had some fields or buttons on a form, and you wanted to not display them unless a field above those fields/buttons contained a value that matched the pattern you originally specified.

Is that not correct?

Subject: RE: lotusscript to find a numeric charactor

Yes, Jerry. You are correct. Below is a test form I tried your suggestion on. The part number has an “R” in the right spot and creates a “0”. If I try a part number without the R, I get a one. This is as far as I seem to be able to get. In an ideal situation, I would want an alert to come up stating “Check for ROHS certs”, instead of a zero and nothing if it is a 1 (no R in that place in partnumber).

Part Number: 6574-8848-R99

If zero, this needs ROHS certification: 0

I know this may be confusing, but I am closer to solving this issue with your help.

I appreciate it very much.

Subject: RE: lotusscript to find a numeric charactor

Jerry;I tried your formula in the Hide Paragraph if Formula is true for each of the two radio buttons. The radio buttons are “Computed for Display”. They still will not display even if the formula is true.

Can you please tell me what I could be doing wrong?

Your code seems right but I must be doing something wrong.

Thank you Jerry