Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
eccentricity
Contributor
Contributor

Requesting for Help on Dynamic View

Hi all,

I've got a problem in loading the dynamic view in Qlik Sense Enterprise. The error message says:

None of the bound fields in the supplied selection contain values that can be bound to the on-demand template app.

2. refresh.png

 

3. constraint.png

 

4. selections.png

 

However, this is strange because the binding field (run_id) in the template app is also present in the selection app. This can be seen from the attached screenshots.

I have also tried doing a dynamic view using similar code (with slight modifications) on Qlik Cloud and that worked so I'm not sure why the selected values for run_id was not bounded to odo_run_id.

5. success.png

 

I have tried looking at the documentation (Apr 2020) but it just mentions that "part of the data binding expression that follows the od_ prefix must be a name that matches a field in the selection app" which is true for the app that I'm working on.

I think I am missing something because I often face this error of selection values can't be bounded to template app whenever I slightly modify the data load editor script. I'm not sure if this is caused by clashing variables as this was highlighted in the documentation which recommends to add a prefix for binding variables for example X_ORIGIN instead of ORIGIN.

It would be super helpful to me and other users if someone can give some deeper insight on how the binding field and selection values work.

Version Used: Qlik Sense Enterprise April 2020

TEMPLATE APP

 

// TEMPLATE APP
Set ENV = 'prod_';

///!ODAG_SSO

LIB CONNECT TO [EDAG_QLIK_CDH_IMPALA];

SUB ExtendWhere(Name, ValVarName)
  LET T = Name & '_COLNAME';
  LET ColName = $(T);
  LET Values = $(ValVarName);
  IF len(Values) > 0 THEN
      IF len(WHERE_PART) > 0 THEN
        LET WHERE_PART = '$(WHERE_PART) AND $(ColName) IN ( $(Values) )';
    ELSE
        LET WHERE_PART = ' WHERE $(ColName) IN ( $(Values) )';
    ENDIF
  ENDIF
END SUB;

SUB BuildValueList(VarName, TableName, ColName, QuoteChrNum)
  IF $(QuoteChrNum) = 0 THEN
    LET LOADEXPR = 'Concat($(ColName),' & chr(39) & ',' & chr(39) & ') AS CombinedData';
  ELSE
    LET CHREXPR = ' chr(' & '$(QuoteChrNum)' & ') ';
    LET LOADEXPR = 'Concat( $(CHREXPR) & $(ColName) & $(CHREXPR)' & ',' & chr(39) & ',' & chr(39) & ') AS CombinedData';
  ENDIF
  _TempTable:
  LOAD $(LOADEXPR) Resident $(TableName);
  Let vNoOfRows = NoOfRows('_TempTable');
  IF $(vNoOfRows)> 0 THEN
    LET $(VarName) = Peek('CombinedData',0,'_TempTable');
  ENDIF
  drop table _TempTable;
  drop table '$(TableName)';
END SUB;

SET run_id='';
OdagBinding:
LOAD * INLINE [
VAL
$(odo_run_id){"quote": "", "delimiter": ""}
];
SET run_id_COLNAME='run_id';
CALL BuildValueList('run_id', 'OdagBinding', 'VAL', 39);

Set WHERE_PART = '';

FOR EACH fldname IN 'run_id'
  LET vallist = $(fldname);
  WHEN (IsNull(vallist)) LET vallist = '';
  IF len(vallist) > 0 THEN
    CALL ExtendWhere('$(fldname)','vallist');
  ENDIF
NEXT fldname

TRACE Generated WHERE clause: ;
TRACE $(WHERE_PART);

LOAD
    customer_id,
    transaction_id,
    transaction_amt,
    transaction_date,
    item_id,
    run_id;
SQL SELECT `customer_id`,
    `transaction_id`,
    `transaction_amt`,
    `transaction_date`,
    `item_id`,
    `run_id`
FROM `IMPALA`.`p01_ext_so_s`.`$(ENV)transaction_table`
$(WHERE_PART);

 

 

SELECTION_APP

 

Set ENV = 'prod_';

LIB CONNECT TO [EDAG_QLIK_CDH_IMPALA];

[SUMMARYTABLE]:
Load
    Distinct [run_id],
    [run_id] as [Key];
SQL SELECT 
    Distinct `run_id`
FROM `IMPALA`.`p01_ext_so_s`.`$(ENV)transaction_table`;

 

Labels (4)
0 Replies