Home Discussions Questions & Answers Dynamically Selecting DFF Columns using Utility

Dynamically Selecting DFF Columns using Utility

Avatar photoCustomer February 25, 2024 at 11:02 am

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?

Viewing 4 reply threads
  • Author
    Replies
    • Support February 27, 2024 at 1:49 am  

      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.

    • Avatar photoCustomer February 29, 2024 at 2:41 am  

      What parameters does `XXEN_UTIL.DFF_COLUMNS` require?

    • Support March 2, 2024 at 5:40 am  

      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.

    • Avatar photoCustomer March 4, 2024 at 2:52 am  

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

    • Support March 5, 2024 at 6:16 pm  

      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”`.

Viewing 4 reply threads
  • You must be logged in to reply to this post.

Login with: