Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need to make some field name edits.
I was hoping that (in the front end) I could do a global find/replace on all defined expressions, but it looks like the Expression Overview dialog box does not include expressions/values defined in document triggers.
Doing this individually/manually is troublesome for a number of reasons. It takes more time, it's tedious, and prone to error. This setup also feels misleading and confusing since I'm now wondering what other areas are being missed/neglected. No, really, what other expressions am I failing to locate/consider?
Is there a better, all-encompassing approach to this pickle?
Thanks,
J.
Hi, using master items will help to centralize expressions, when you change the master item it updates all places where it is used.
Another option is to have an excel file or similar that stores all expressions, load each row(expression) as a variable and use this variable instead of the expression: $(varExpressionName)
This way if you want to change the name of a field in many different expressions you can do it with a search and replace in the excel file.
You can create all rows of an excel as variables with a script like this:
ExcelData:
LOAD VariableName,
VariableValue
FROM [Variables.xlsx] (ooxml, embedded labels, table is Sheet1);
// if variable names AND variable values are defined in the excel sheet then assign the variables this way
for vVariableNo = 0 to NoOfRows('ExcelData')
Let vVariableName = peek('VariableName',vVariableNo,'ExcelData');
Let $(vVariableName) = peek('VariableValue',vVariableNo,'ExcelData');
next vVariableNo
https://community.qlik.com/t5/QlikView-App-Dev/Store-Excel-Values-in-variables/td-p/351302
You mentioned Expression Overview so I assume you are using QlikView. Although you can't edit, you can use QV Document Analyzer to find all occurances of a field -- including in Document Triggers.
Qlikview Cookbook: QV Document Analyzer https://qlikviewcookbook.com/recipes/download-info/document-analyzer/
-Rob
This is a good suggestion, and I have been gradually centralizing some of my variables (in 'include' files rather than an excel), but at present I'm working files where this is not the case.
Bugger. I posted in the wrong forum. 😐
I will check out the Document Analyzer option. Thank you!