Home › Discussions › Questions & Answers › Hidden Parameters for Dynamic GL Segment Columns

Hidden Parameters for Dynamic GL Segment Columns

Avatar photoCustomer Questions & Answers 7 replies

Our organization uses multiple ledgers with different Charts of Accounts. I need a single AR report that can dynamically adjust its output columns to include the correct segment columns (e.g., segment1, segment3) based on the ledger selected by the user, without showing the configuration parameter itself. How can I implement this invisible, dynamic behavior?

7 replies

  • Support Enginatics

    You should leverage a hidden parameter that utilizes a negative display sequence number to conceal it from the user interface . This hidden parameter should be configured with a `&lexical` anchor and a SQL text that dynamically generates the required column string, based on the value of a user-facing parameter (like the selected Ledger name) . The `Report AR Transactions and Lines` serves as a good example of this, where a hidden Ledger parameter dynamically generates a string for the revenue account columns based on the chart of accounts segment setup .

  • If the parameter is hidden (negative sequence), how do I define its default value to perform the necessary logic based on the visible Ledger parameter?

  • Support Enginatics

    To link the hidden parameter’s logic to a visible parameter, you define its Default Value using the dependent parameter syntax: `:$flex$.parameter_or_lov_name` . For example, the default value SQL could query the Chart of Accounts structure using the visible Ledger parameter name, dynamically building the SQL string for the `&lexical` anchor, ensuring the necessary column list is inserted into the main extraction SQL at runtime , .

  • Where exactly does this dynamically generated SQL text get placed in the main report query?

  • Support Enginatics

    The dynamically generated SQL text is placed exactly where you define the `&lexical` anchor within your main report query . Unlike `n=n` anchors which are confined to `WHERE` clauses, the `&lexical` anchor is versatile and can be used to insert dynamic columns directly into the `SELECT` statement (e.g., `select &columns …`) , . The system replaces the entire placeholder (`&lexical`) completely with the generated SQL text at run-time .

  • Is there a mechanism to prevent users from accidentally submitting the report without restricting the Ledger, potentially running a massive query?

  • Support Enginatics

    Yes, you should set the primary Ledger parameter as Required . The required flag enforces a value entry by the user, which prevents accidental submission of the report with insufficient parameter restrictions . If you need more complex validation than a simple required flag, you can use the ‘Advanced Required Parameters’ feature to define a logical expression (e.g., `:$flex$.ledger_name is not null`) that must be met before submission .

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