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.
Best 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
-
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;
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 136 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 485 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives