I believe you can use dynamic query and to do unit conversion inside the query.
Dynamic query can look something like this:
Select 1000 * Radius as RadiusMM From Cell Where....
as based on your suggestion, I wrote this .
Dim x As String
x = "Select [pdropcalc_sc] FROM [FWHRead] Where ProjectId='"+Convert.ToString(Me.project_id)+"'"
Dim y As Double= Convert.ToDouble (x)
Result = y*7.030696*.01
But rulestream engineer is showing input string is not in correct format.
What do you expect to get using this rule? I see that you are trying convert to Double your X variable which is your string query generally.
Also keep in mind that g_ComponentData.ExecuteSQL return DataSet, not the value.
I want to get a cell value from a table and then apply unit conversion on it. Currently, I make a database constraint and then apply unit conversion in a different property. I am having long list of such properties. So , if there is anyway to do in same property of which db constraint is being made.
Hi, @arp123. Below some explanations.
Hope this help.
@arp123the general answer to your main question is that if you bind a property to a DB constraint, RS does not execute the formula. The property formula is executed ONLY if the DB constraint fails to retrieve any row or it retrieves a NULL value.