Jump to content
Server Maintenance This Week. ×

Real time character count


This topic is 7321 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I have a field into which a user may enter free flowing text. I'd like to be able to give the user a real time indicator as to how many characters have been input thus far. I currently have a script which calculates the count but it requires the user to trigger said script by clicking a button. Is there any way to do this without the user having to exit the text input field? Thanks!

FileMaker Version: 6

Platform: Windows XP

Link to comment
Share on other sites

You can make a looping script with a short pause:

Loop

Set Field [ FieldLength, Length ( MyText) ]

Pause/Resume Script [0:00:01]

End Loop

Trigger the script when you navigate to the layout, and make sure to add Halt Script options on navigation buttons that leave the layout, so it won't keep looping.

Link to comment
Share on other sites

Thanks! That works great. The problem I'm having now is to get the looping script to stop. My navigation buttons actually involve scripts and not just going to a different layout. When I place a "Halt Script" step at the beginning of that navigation action, it halts the subsequent script as well. I've tried an "exit loop if" based on a field value but even when that field value changes, the script continues on. I've also tried getting it to exit based on a getstatus(LayoutName) function. Any thoughts would be greatly appreciated.

Link to comment
Share on other sites

Don't put the Halt Script in the navigation scipts, choose Halt Script as a button option in the button definition box on each button on the screen.

Exit Script works too, but in nested scripts, only the last sub-script will be exited.

Link to comment
Share on other sites

One more thing... This is working but with one bothersome exception: At the moment the script is pausing and resuming, user input is interrupted and results in skipped characters. I've tried different time intervals for the pause/resume, but with unsatisfactory results.

Is there any other way to accomplish this?

Link to comment
Share on other sites

This topic is 7321 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.