Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI Guys,
I have an Stored procedure in My SQL Server which I want to execute in Qlikview , I need to pass the value to the stored procedure by selecting on the field in Qlikview upon which I need to reload the data to get the values returned by the proc
I have used
SQL EXEC Proc_Name '$(vSL)','$(vEL)';
vStartLocation= getFieldSelection(Source Name)
vEndLocationL = GetFieldSelection(Destination Name)
LET vSL= $(vStartLocation);
LET vEL = $(vEndLocation);
the values vStartLocation and vEndLocation are declared in the variable overview and vEL and vSL are declared in the script, but the problem it is not passing the values into the variables
Can someone help me on this?
Thank you,
Vivek
Hi vivek,
You cannot use GetFieldSelections on Script, but you can use Vars on Script.
On Script:
IF Len('$(vSL)')>1 and Len('$(vEL)')>1 THEN
SQL EXEC Proc_Name '$(vSL)','$(vEL)';
END IF;
On design:
Create one action on Field Triggers, on each field, on document properties.
Source Name field -> Set Variable:
vSL -> =If(GetSelectedCount([Source Name])=1,[Source Name],' ')
Destination Name field -> Set Variable:
vEL -> =If(GetSelectedCount([Destination Name])=1,[Destination Name],' ')
Create a button with Show Condition:
IF(GetSelectedCount([Source Name])=1 and GetSelectedCount([Destination Name])=1,True(),False())
This button may have one action, External -> Reload
Regards!!!!
GetFieldSelection() can't be executed in the script context.
Try creating a trigger OnSelect for fields Source and Destination Name in the front end (settings - document properties - triggers) and use an External - Set Variable action to copy the selection value to a variable.
Hi vivek,
You cannot use GetFieldSelections on Script, but you can use Vars on Script.
On Script:
IF Len('$(vSL)')>1 and Len('$(vEL)')>1 THEN
SQL EXEC Proc_Name '$(vSL)','$(vEL)';
END IF;
On design:
Create one action on Field Triggers, on each field, on document properties.
Source Name field -> Set Variable:
vSL -> =If(GetSelectedCount([Source Name])=1,[Source Name],' ')
Destination Name field -> Set Variable:
vEL -> =If(GetSelectedCount([Destination Name])=1,[Destination Name],' ')
Create a button with Show Condition:
IF(GetSelectedCount([Source Name])=1 and GetSelectedCount([Destination Name])=1,True(),False())
This button may have one action, External -> Reload
Regards!!!!