Cancel
Showing results for 
Search instead for 
Did you mean: 

Firing a boolean property from other boolean property

Experimenter
Experimenter

I am having a large sql query running more than 6500 characters. I want to give only one Button to save in database. I want to fire other button when one click on the visible button. Other button would remain invisible. How to trigger the when Changed of other button when a visible button is clicked?

3 REPLIES

Re: Firing a boolean property from other boolean property

Genius
Genius

Maybe I didn't understand well.
But this sounds weird.
Maybe you can use just ActionButton and have the query in the custom.vb file.

Betreff: Firing a boolean property from other boolean property

Siemens Genius Siemens Genius
Siemens Genius

If you want to create a button click event with a property.

 

Please use this formula to ensure that the button has been clicked

 

If Value Is Nothing AndAlso OldValue Is Nothing Then      'button is clicked

'Place your code here

End If

I got that from the nuggets. 

 

Betreff: Firing a boolean property from other boolean property

Pioneer
Pioneer

Christian, the code that you found in nuggets is correct but it is meant as a guideline on how to put code inside a whenchanged formula that is intended to be tied to a button. If you do not enclose the code within that 'IF' block, RS wouldn't know the difference between when the button was clicked vs. if the value of the property changed - i.e. the code in whenchanged formula would execute even if the button was not clicked and that is not desirable.

 

What the original question is asking (I think) is to have code in 2 different WhenChanged formulas but have only one button to do that. While you can do this in a couple of different ways (I've never had the need to do it yet), what you could also do is tie the button to a custom.vb function (like Yuri suggested). My personal inclination is to avoid custom.vb as much as possible so what I would do in this case is build the SQL statement (using more than one properties if the character count is over 6500) and just execute the code in WhenChanged (rather than building the SQL in there as well).

 

Dharmesh Sanghavi