Retrieve Specific Virtual ID From Report Based on Column Name

The Get Report module in Bridge does not allow us to specify a column the way the Get Sheet module does. How can I use the column name to pull the virtual ID for that column?

In the last screenshot containing the runtime data, I need to be able to reference the title to pull the virtual ID for a specific column.

Tags:

Best Answer

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    Answer ✓

    I ended up solving this by first extracting the column names into one array, extracting the IDs into another array, and then using a JS module to find the index of the name array based on the column name and then output that same index from the second array.

    ChatGPT gave me the JS, and it worked like a charm once I mapped my three variables.:

    // INPUTS: referenceColumnName, arrayOfColumnNames, arrayOfColumnIDs
    
    // Find the index of the Reference Column Name in the Array of Column Names
    
    const
     index = arrayOfColumnNames.
    indexOf
    (referenceColumnName);
    // Initialize the output variable
    
    let
     output = 
    null
    ;
    // Check if the index is valid
    
    if
     (index !== -
    1
    ) {    
    // Get the corresponding Column ID from the Array of Column IDs
        output = arrayOfColumnIDs[index];}
    // OUTPUT: output (Column ID corresponding to the Reference Column Name)
    
    return
     output;
    

Answers

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    Answer ✓

    I ended up solving this by first extracting the column names into one array, extracting the IDs into another array, and then using a JS module to find the index of the name array based on the column name and then output that same index from the second array.

    ChatGPT gave me the JS, and it worked like a charm once I mapped my three variables.:

    // INPUTS: referenceColumnName, arrayOfColumnNames, arrayOfColumnIDs
    
    // Find the index of the Reference Column Name in the Array of Column Names
    
    const
     index = arrayOfColumnNames.
    indexOf
    (referenceColumnName);
    // Initialize the output variable
    
    let
     output = 
    null
    ;
    // Check if the index is valid
    
    if
     (index !== -
    1
    ) {    
    // Get the corresponding Column ID from the Array of Column IDs
        output = arrayOfColumnIDs[index];}
    // OUTPUT: output (Column ID corresponding to the Reference Column Name)
    
    return
     output;