Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to copy variable from one doc to another qv doc ?

Hi All

In setting variable I can create variety

I need to copy all . Instead of manually create one by one.

Any fast way ?

1 Solution

Accepted Solutions
afurtado
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi.

I have an document that show how to recovery from -prj

AMF

furtado@farolbi.com.br

View solution in original post

10 Replies
Anonymous
Not applicable
Author

Paul

Put the variable definitions in an external qvs script file and include in them in your qvw's with an Include or MustInclude statement.

Best Regards,     Bill

afurtado
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi.

I have an document that show how to recovery from -prj

AMF

furtado@farolbi.com.br
Not applicable
Author

Hi Bill

Thank . But I not able to understand.  What I mean is one of my doc have 50 variable plus expression. I need to copy to 5 of my QV doc. I lazy to start new doc . Just want to add vat. 

Sent from Samsung Mobile

Not applicable
Author

Hi Ales

Thank you for your document. it help a lot .

Paul

flipside
Partner - Specialist II
Partner - Specialist II

You can also read direct from the QVW ...

 

ReadVars:

LOAD Name, RawValue
FROM [doc1.qvw] (XmlSimple, Table is [DocumentSummary/VariableDescription])
where IsConfig='false' and IsReserved='false';

For i
= 0  to NoOfRows('ReadVars')

     Let n = peek('Name',i,'ReadVars');

     Let $(n) = peek('RawValue',i,'ReadVars');

next i;

Let i = Nothing;

Drop Table ReadVars;

flipside

Not applicable
Author

We can't get the Variable definition from -prj folder XML file.

Not applicable
Author

Hi Dathu

Do you mean the script propose by this post is unable to work ?

Paul

Not applicable
Author

Hi Paul, I am not recovering the variable definition from the method proposed in pdf file. for example, i have variables in the script like below:

LET vSales = 'sum(SALE_AMT)';

LET vYTDSales = 'sum({<YTD_FLAG={1}>}SALE_AMY)';

I recovered only variable names only,vSales and vYTDSales not both variable name and variable definition.

Not applicable
Author

Very Good!

Thanks