0 Replies Latest reply on Jan 7, 2012 9:55 PM by kaostika

    Execute SQL into Merge Variable


      The Creative Genius of Kaostika Studios has struck again. A few years ago, I created a technique to use Conditional Formatting to trigger Merge Variable and display info. It is almost like Display Calculations. Well now I have struck again. You can use SQL commands in the conditional formatting and use SQL (If you have a plugin). So you can set up a layout with out fields and only use Merge Variables.


      Here is a use case. I have a client that has multiple addresses. So I want to show just the address they pick from the many they have for a client. To show it on another layout I would need to set up a special relationship or use a filtered portal with a calculation in it. This take a lot of time to set up.


      Well those days are gone. I can set up a SQL command like

      ( epSQLExecute( "

      SELECT SQL_Text

      FROM Var

      WHERE id=" & epSQLQuote(Var::Id)

      ) )


      So you can have this SQL command to get the correct address based on the conditions you use in the conditional formatting.


      Bye Bye Graph!


      I enclosed a sample file. It is this easy. You need the custom functions to set the variable and then just put in the SQL. I use SQL runner as the plugin.