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

Save specific fields from table-box as different fields to QVD using macro?


Hi,

I have two requirements:

1. To save specific fields and not all the fields from a Table-Box into QVD.

2. The resultant QVD should have that many different fields as are saved in the step above (and not one field).

For example, my table-box may contain 5 Fields. F1, F2, F3, F4 and F5.

I need to write macro to pick only F4 and F5 from table-box and save it as two different fields (and 'not' concatenated as one field) in a QVD.

From community I came to know about the following piece: But, It saves the whole Table-Box and all fields are concatenated as a single field in the QVD

set obj = ActiveDocument.GetSheetObject("TB01")
obj.Export "D:\Developer\Cash\Sett.qvd", 4

6 Replies
Gysbert_Wassenaar

Create another table box with only the fields you need and export that table box with your macro. You can hide the table box so the users won't see it.


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks for your reply.

Approach you suggested helps me except a condition. My table-box actually contains a column as INPUTFIELD (takes user input). And I have another column that contains the RowNo. So, I want to store these two columns only, from TableBox, once the user finishes all the inputs. Therefore the value of a column in not known during reload and that stops me to create a sperate hidden table.

Gysbert_Wassenaar

I don't understand why the inputfield would stop you from creating two table boxes and hiding one of them. Can you explain that?


talk is cheap, supply exceeds demand
Not applicable
Author

Hi Gysbert.

I am not sure if I explained my problem in right direction. But, if InputField is one among many fields inside a table box, how then we can select this particular InputField and save it in a seperate table-box. I want to achieve this at the button click event (external-macro). Please let me know if I need to produce an example to understand this in a better way.

Not applicable
Author

Hi - The situation is simlar to the Table-box show below:
IDTicketNoCurrencyPaidRcvdBalanceRelevant_TXN_ID
1US320USD2003
2US324USD-1103
3TXN401903
4UK119EUR1767
5UK121EUR-767
6UK128EUR-1007
7TXN43107
Here "Relevant_TXN_ID" is in InputField. I need to save two columns "ID" and "Relevant_TXN_ID" in a QVD as two different columns, at the Button-Click event.
Not applicable
Author

Can anyone please help me with this issue?