Computed field - count characters being keyed while keyed?

Can you set up a computed field that captures data from another field as the user is keying the information in the other field? Not having to refresh - tab - etc.?

Example: Field1 is text field

Field2 is computed field to count length of Field1 (work with me here!) If I do an @Length of Field1 = 1, then I want a 1 to show in my Field2; @Length of Field 1 = 3, then I want the computed field to show 123. And so on. . . is it possible to have a field compute as a user is typing?

Subject: Computed field - count characters being keyed while keyed?

I (as I’m sure others) was thinking about that when you posted your earlier question.

To my knowledge, no there isn’t a way. There is no keyclick, type event.

I don’t even know of a way to do like html tags maxsize in notes.

Subject: RE: Computed field - count characters being keyed while keyed?

Ok, thank you. I’ll keep trying to think of a better way to handle.

Subject: RE: Computed field - count characters being keyed while keyed?

well you can do it kinda sorta, here’s how

Your main editable field would be a combo box (keyword field) and you would enable refresh fields on keyword change and allow values not in list and set cell border to none. create a second editable text field below it but make it hidden. in the hidden field’s input translation formula put this:

@If(@Length(main) < 31; @Return(main);

@Do(@Prompt([ok]; “”; “Field limited to 30 characters”);

FIELD main := @Left(main; 30)))

to see it working leave the hidden field visible until you have it the way you want it. The Input Translation event fires as the user changes the value in the combo box field so it refreshes the field as each character is entered and when the count gets to 30 the user gets a prompt.

Subject: Computed field - count characters being keyed while keyed?

Hi Patty:

This will work…

  1. Create an editable DialogList field (eg. LimitField)

  2. Make sure the ‘Allow Multiple Values’ is NOT checked.

  3. Use ‘Formula for Choices’ and make the formula the same as the field name. (eg. LimitField)

  4. Un-check ‘Display Helper Button’

  5. Check ‘Refresh fields on keyword change’ and Refresh choices on document refresh’ and ‘Allow values not in list’

  6. Create a computed number field with the following formula: @If(LimitField =“”;0;@Length(LimitField))

Can’t take all the credit, the old posting below was the key…

http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/50a5ecb507c313d885256d1f002e5db0?OpenDocument

Regards,

Chris

Subject: Cool that works!!

Interesting I still seem to see the helper icon?

Guess you just needed me to say I didn’t think it was possible to get some answers Patty? :slight_smile:

Subject: RE: Cool that works!!

Awesome! Thank you, thank you!!!