Jump to content
J. Miller

Clearing a text parameter

Recommended Posts

Posted (edited)

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

Share this post


Link to post
On 3/12/2018 at 2:22 PM, J. Miller said:

IF PpopUP = 'Custom' then begin

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

 

Hi Jeff,

 

What exactly do you mean by this?  If SetRField() works, what user data isn't sticking?

Share this post


Link to post

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

 

 

 

Share this post


Link to post

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.

Share this post


Link to post

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

×