Jump to content
Developer Wiki and Function Reference Links ×

Clearing a text parameter


Recommended Posts

I have a PIO that has a pop-up menu.

Base on the PIO selection it fills a group of text parameters.

This works just fine, BUT..

I also have a 'custom' choice in the pop-up selection \.

I would like the group of text  parameters to clear and be ready for user input.

I can't can clear the info  but the user data doesn't stick.

IF PpopUP = 'Custom' then begin

     SetRField(han, object name, field name, ' ');  works, but the user data doesn't stick.

 

It seem i'm missing something here

Any help

Thanks,

Jeff Miller

Edited by J. Miller
Link to comment

what i want to do is clear a handful of text parameters so the user can enter his own data when the "Custom" selection is chosen on the pop-up parameter.

I don't want the existing data to linger, so i figured clearing them with a SetRField(han, object name, field name, ' ');

This works but when the user types in their info it clears the text parameter again.

I'm just not sure where to place a clear field name that doesn't clear the text after it is entererd by the user.

Do I need to to make this an event enabled plug in?

Jeff

 

 

 

Link to comment

OK, got it.  

 

What you do now is clear the data fields every time the object regenerates and the menu option is set to custom.  You are correct that an event enabled object would solve this, and is the most straight forwards solution.  Essentially: if the pul-down is changed AND the value is Custom, then clear the data fields.

 

The other alternative would be to add a hidden parameter to also store the value of the pulldown at the end of the script, essentially giving you a "previous_choice" field.  Only clear the data when the choice equals custom and the previous_choice does not equal custom.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...