Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Patfoort47
Contributor II
Contributor II

Dynamic View Error

Hello, I have a similar error with Dynamic View.

The error is: Type Error: Cannot read properties of undefined ( reading '0').

This happens when loading dynamic view graphics. But it can disappear by applying filters but can also come back… I don't really understand how it appears and where the problem comes from Would you be where it comes from?

I have attached a screenshot. thanks in advance

Labels (2)
4 Replies
srchagas
Creator III
Creator III

This errors happens  when one of your filters has been set like a number and you are giving him  string, so he can't not interpret the data correctly , check on the selections if everything is matching.

Or you sending a parameter with doesn't not exist.

Patfoort47
Contributor II
Contributor II
Author

Hello @srchagas , I put my variables in string after in number but nothing works. I made the same request directly in Snowflake and they turned out fine…

Here is the odag variable initialization script:

IF '$(odagActive)' = '' THEN
TRACE ODAG variables not inserted, loading sample data;
    SET 'odag_MOIS_ANNEE' = '''202305''';
    SET 'odag_ARTICLE_CODE' = '''MODELE', 'PALPFN''';
    SET 'odag_CODE_SITE' = '''0000001126''';
END IF;
SET 'preset_MOIS_ANNEE' = $(odag_MOIS_ANNEE);
SET 'preset_ARTICLE_CODE' = $(odag_ARTICLE_CODE);
SET 'preset_CODE_SITE' = $(odag_CODE_SITE);
 
And here I put the data loading script with the variables :

VENTES_DV:
LOAD
*;
SELECT
"Ticket_Caisse_Valide_Site_Identifiant" as "CODE_SITE",
RIGHT("Ticket_Caisse_Valide_Article_Code", 6 ) as ARTICLE_CODE,
"Calendrier_Mois_Code" AS MOIS_ANNEE,
sum("Ticket_Caisse_Valide_Montant_Ligne_Montant_NET") as FVTE_CA_PVP_TTC_NET,

FROM "DATASERVICE"."V_F_TICKET_CAISSE_VALIDE_LIGNES"
LEFT JOIN v_d_calendrier
ON to_date("Ticket_Caisse_Valide_Date_Enregistrement") = v_d_calendrier."Calendrier_Date"
WHERE (case
when concat($(odag_MOIS_ANNEE))='' then 1=1
else "Calendrier_Mois_Code" =
(SELECT MAX("Calendrier_Mois_Code")
FROM v_d_calendrier
WHERE "Calendrier_Mois_Code" IN ($(odag_MOIS_ANNEE)))
end)
AND (case
when concat($(odag_ARTICLE_CODE))='' then 1=1
else RIGHT("Ticket_Caisse_Valide_Article_Code", 6 ) in ($(odag_ARTICLE_CODE)))
end)
AND (case
when concat($(odag_CODE_SITE))='' then 1=1
else "Ticket_Caisse_Valide_Site_Identifiant" in ($(odag_CODE_SITE))
end)
GROUP BY 1, 2, 3;

thanks in advance

srchagas
Creator III
Creator III

when you run directly the app  works ?
 does the field are with  "_" or space? , the odag name field has ben equals to the app will sent the parameters

Patfoort47
Contributor II
Contributor II
Author

When launching the application it works since there is a default filter that selects few articles. But for example if I want to take all the articles it does not work and displays the error marked above.

In terms of naming, I used the same field with the same name to avoid bugs.

The field is fine with "_" (ARTICLE_CODE") but there is no space.