Home > Forum > Rules, JS, SQL > Q: How Can I Dynamically Retrieve Column Names from Value Form Fields as Parameter for a Universal Business Rule?

Q: How Can I Dynamically Retrieve Column Names from Value Form Fields as Parameter for a Universal Business Rule?
0

MVP

Hello everyone,

I need your assistance with something. I am currently working on a Business Rule that should return a value using SQL. The Business Rule needs to be as universal as possible, and I want to pass two parameters to the SQL query.

So far, so good. The issue is that I want to pass the same form field as a parameter twice: once as a value and once as a "column name" (essentially as an object value that I can transform in SQL with single quotes to something like WFD_AttText4). This way, in the SQL WHERE condition, it would say something like "and WFD_AttText4 = '7512373' ".

The problem is that you can only pass values as parameters, not objects. Does anyone know how I can get the column name from my value field? Otherwise, I would have to manually enter the column name, just like in reports.

Thank you in advance,
Bjoern

MVP
In reply to: Karol Częczek

Hi,
it seems to me that it is enough if you map the field from the objects tab.

Regards.

Hi Karol,

thanks for your reply. Within a Business Rule, you could select an OBJECT FIELD. My Problem is, that I need that as a BR PARAMETER.
The usage ist within "Style and Behavior": SET [Targetfield] = BUSINESS RULE[ Parameter 1, Parameter 2, Parameter 3, Parameter4].

And in that usage, no OBJECT Form fields are selectable (see image).

Thank you nonetheless,
Bjoern

Privacy overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognizing you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.


To see a full list of the cookies we use and learn more about their purposes, visit our Privacy Policy.