Home › Discussions › Questions & Answers › Dynamically Selecting DFF Columns using Utility

Dynamically Selecting DFF Columns using Utility

Avatar photoCustomer Questions & Answers 5 replies

I need to build a report that dynamically includes DFF columns based on configuration, rather than hardcoding them. Is there a utility function for this?

5 replies

  • Support Enginatics

    Yes, you should use the function **`XXEN_UTIL.DFF_COLUMNS`**. This function is designed to return a SQL text snippet suitable for `&lexical` replacement in your report’s extraction SQL.

  • What parameters does `XXEN_UTIL.DFF_COLUMNS` require?

  • Support Enginatics

    Key parameters include `p_table_name` and `p_table_alias`. It can also take optional parameters like `p_descr_flex_context_code` to restrict to a specific context, or `p_column_name_prefix` to add a prefix like ‘Item: ‘ to the column name aliases.

  • If I use this utility, will the generated columns use the DFF prompt names as aliases?

  • Support Enginatics

    Yes, the function automatically generates column text that uses the DFF’s form left prompt as the column alias, such as `msiv.attribute15 “Invoice UOM”`.

  • You must be logged in to reply to this post.