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.
Solved! Go to Solution.
I may have found my answer. In the When Changed just add this:
CType(Me.Properties("Login"), PropertySF).InputValue = ""
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.
You can create a dependence in the formula simple by writing a formula like this:
dim t as string
t = me.FullName
Result = ""
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
Result = String.Empty
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.