Set-Item wsman:\localhost\Client\TrustedHosts serverName -Concatenate -Force
Sometimes it can be usefull to hide/show a column in relationship with a selection made in another elements.
In order to do so, you can use conditional view
In my test case, i've defined one expression called Type with tow values possible (PROD and MAINT).
When applying following condition, column is displayed if value selected is PROD or if both values are selected.
I needed to load the most recent file to load datas in a qlikview app.
My problem was that the most recent file was not based on date time of the file but based with the name of the file.
Goal is to load data and sort them desc and return only the first record, so i get the most recent file.
Sub DoDir (Root)
// filetype to search for in current directory, assuming files are excel type (.xls) For Each Ext In 'xls'
For Each File In FileList (Root & '\YOUR FOLDER NAME*.' & Ext)
Load '$(File)' as Name
//if you want to sort by file date time uncomment next line and adapt loop
//FileTime('$(File)') as FileTime,
RangeSum(Peek('FileCount'), 1) as FileCount
// search in subdirectories, uncomment if needed (recursive loop) For Each Dir In DirList (Root & '\*')
Call DoDir (Dir)
//Call the fucntion DoDir with the path to the folder to be scanned
Call DoDir ('CHANGE TO YOUR FOLDER PATH THAT WILL BE SCANNED');
FIRST 1 LOAD Name AS MostRecentFileName
ORDER BY Name DESC;
LET vFileToLoad = FieldValue('MostRecentFileName', 1);
//load datas to be used in your QlikView app
LOAD * FROM $(vFileToLoad)(your source parameters);