Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
eruditio
Contributor III

Does QlikView handle the equivalent of struct in C ?

Hi,

Does anyone know if we can call upon C language within Qlikview?

Thanks,


Antoine

Tags (3)
4 Replies
MVP
MVP

Re: Does QlikView handle the equivalent of struct in C ?

I don't think so. But what do you want to achieve? Probably there is a "QlikView way" to do this.

A table with its fields might not be so much different.

eruditio
Contributor III

Re: Does QlikView handle the equivalent of struct in C ?

Thanks Stefan.

My intent is to work with vectors within QV. (Assuming that k is 0 to simplify)

I have started by declaring the function Magnitude

SET f.v.Magnitude=

if(

    len($1)>0 and len($2)>0

    ,sqrt(sqr($1)+sqr($2))     

    ,'Rejected'

    )

;   

Then the function Angle

SET f.v.Angle=

    if(

    len($1)>0 and len($2)>0 and $1<>0

    ,atan($2/$1)     

    ,'Rejected'

    )

;

then I load the i, j, k magnitudes:

[0]:

LOAD *,

    $(f.v.Magnitude(i, j)) as Magnitude

    ;

LOAD i,

     j,

     k,

     $(f.v.Angle(i, j)) as Angle

    

FROM

[vector representation v1 - coordinates.xlsx]

(ooxml, embedded labels, table is Sheet1);

Note that for an obscure reason, the same script won't work if I load it like this:

[0]:

LOAD *,

    $(f.v.Magnitude(i, j)) as Magnitude,

    $(f.v.Angle(i, j)) as Angle

    ;

LOAD

     i,

     j,

     k

         

FROM

[vector representation v1 - coordinates.xlsx]

(ooxml, embedded labels, table is Sheet1);

Thanks,


Antoine

MVP
MVP

Re: Re: Does QlikView handle the equivalent of struct in C ?

I am not sure if I understood your issue. But your both sections of code works fine with my inline data. PFA

eruditio
Contributor III

Re: Does QlikView handle the equivalent of struct in C ?

Thanks, now it works. must have written something wrong in my initial attempt. weird.

Community Browser