Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Passing login details and variable from Dashboard to Script Editor

I am pretty new to Qlikview.

I am trying to convert an excel based reporting utility to Qlikview.

My dashboard page contains:

Input Box for Username, Password, DNS name.

A load button to trigger the Reload action.

A few list boxes to select some data.

A calendar box.

I have the following issues and questions:

1. When user is entering Password, how to hide it with *

2. Even after entering username, password and DSN name still it asks for password again. The DSN box appears where I need to reenter password.

3. The value from calendar is being stored in variable. But variable value is appearing as number.

4. What is the way to use dashboard variables to script editor.

Below is my script editor code:

SET ThousandSep=',';
SET DecimalSep='.';
SET MoneyThousandSep=',';
SET MoneyDecimalSep='.';
SET MoneyFormat='$#,##0.00;($#,##0.00)';
SET TimeFormat='h:mm:ss TT';
SET DateFormat='M/D/YYYY';
SET TimestampFormat='M/D/YYYY h:mm:ss[.fff] TT';
SET MonthNames='Jan;Feb;Mar;Apr;May;Jun;Jul;Aug;Sep;Oct;Nov;Dec';
SET DayNames='Mon;Tue;Wed;Thu;Fri;Sat;Sun';


ODBC CONNECT TO [$(v_database); DBQ=$(v_database)] (XUserId is $(v_username), XPassword is $(v_password));


BALANCE_TYPE:
Load * inline
[
BALANCE_SORT_ORDER, BALANCE_TYPE,BALANCE_VALUE
1, 'DAILY', 'D'
2, 'WTD', 'WTD'
3, 'MTD', 'MTD'
4, 'YTD', 'YTD'
5, 'MTD & YTD', 'MTD,YTD'
6, 'QTD', 'Q'
]
;

AMOUNT_TYPE:
Load * inline
[
AMOUNT_TYPE_SORT_ORDER, 'AMOUNT TYPE',AMOUNT_VALUE
1, 'PD10', 1
2, 'BAH', 9
]
;


trace date('$(v_fromdate)');
trace date('$(v_enddate)');
trace '$(v_balance_type)';

V_PIVOT:
SQL
SELECT *
FROM V_PIVOT
WHERE AMNT_DATE BETWEEN date('$(v_fromdate)') AND date('$(v_enddate)')
AND CHR_TYPE_ID='$(v_balance_type)'
;

1 Reply
Not applicable
Author

Hi Abhijit,

1,2) Are you providing report access through publisher?

3) When loading data  for V_PIVOT, use date formatting function to load date columns as required

V_PIVOT:
Load
[Your Column List from below SQL],
Date([Your SQL date column], 'YYYY.MM.DD');// for all date columns use date formatting function

SQL
SELECT *
FROM V_PIVOT
WHERE AMNT_DATE BETWEEN date('$(v_fromdate)') AND date('$(v_enddate)')
AND CHR_TYPE_ID='$(v_balance_type)';

4) Create a variable in script editor using SET keyword, which can be used on dashboard expressions.

SET vName = 'ABHIJIT';