Cancel
Showing results for 
Search instead for 
Did you mean: 

Change Property value when another value is changed

PLM World Member Genius PLM World Member Genius
PLM World Member Genius

I have a UI with Property for Full Name and for Login. If Full Name is filled out I have an Action Button that will query a different system and retrieve the Login (and other fields). If I make a change to Full Name, I want to blank out, or set back to default the Login since they don't match any more.

Is this possible using When Changed or something else? I'm thinking there isn't anything simple since I can't set a property value from another property.

7 REPLIES

Re: Change Property value when another value is changed

PLM World Member Genius PLM World Member Genius
PLM World Member Genius

I may have found my answer. In the When Changed just add this:

CType(Me.Properties("Login"), PropertySF).InputValue = ""

or

CType(Me.Properties("Login"), PropertySF).RevertToCalc

Re: Change Property value when another value is changed

Creator
Creator

Yes, @breving, it looks correct. But I also think that just 

Me.Properties("Login").RevertToCalc

will also work.

 

Re: Change Property value when another value is changed

Valued Contributor
Valued Contributor

Using RSArchitect if the "Other" properties are dependant on the "Full Name" property you can simply select the "Revert To Calculated Value" on the formula type of the "other" properties.  At runtime when the full name property changes this will cause the other properties to refire.

Re: Change Property value when another value is changed

Valued Contributor
Valued Contributor

I was incorrect with the formula type, the correct formula type is "Auto Revert".

Re: Change Property value when another value is changed

PLM World Member Genius PLM World Member Genius
PLM World Member Genius
They are "dependent" through an external query. So not actually dependent from Rulestream perspective.
________________________________
NOTICE OF CONFIDENTIALITY:
This message may contain information that is considered confidential and which may be prohibited from disclosure under applicable law or by contractual agreement. The information is intended solely for the use of the individual or entity named above. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the information contained in or attached to this message is strictly prohibited. If you have received this email transmission in error, please notify the sender by replying to this email and then delete it from your system.

Re: Change Property value when another value is changed

Valued Contributor
Valued Contributor

You can create a dependence in the formula simple by writing a formula like this:

 

dim t as string

t = me.FullName

 

Result = ""

Re: Change Property value when another value is changed

Pioneer
Pioneer

Instead of having a button to trigger it, you can simply have the code (that you currently have in your button event) in your 'Login' formula enclosed by:

 

If FullName.Length > 0 Then

    'Get login data from external system

Else

    Result = String.Empty

End If

 

And, like Bob said, set the property type as 'Auto Revert'.

 

If you really want the button, you can still have it and have it do nothing. Believe it or not, there are UIs where others have done it. This way, the user gets the perception that the button triggered the population of the 'Login' field.

 

Dharmesh Sanghavi