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

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

GetCurrentField function

Dear forum,

I have created cyclic group in finencial application for company, location, profit center etc...

but my group is not just companyid but each field is company id & ' - ' & companyname and same for location

how can i show the current active field in this group.

I went through the link http://community.qlik.com/forums/p/15846/61546.aspx#61546

but using GetCurrentField will display 10001 - ABC Company, i want its label that i put for each calculated field in group.

1 Solution

Accepted Solutions
Not applicable
Author

You can create a new field in your script:

company id & ' - ' & companyname AS Company

View solution in original post

5 Replies
marcel_olmo
Partner Ambassador
Partner Ambassador

Could you explain it widely?

The solution to your problem i think it's definitely getCurrentField() because it returns to you the current field of a hierarchical or cyclic group. (It should work)

So what do you need in addition?

Not applicable
Author

You can create a new field in your script:

company id & ' - ' & companyname AS Company

Not applicable
Author

Hi Shubhasheesh,

Getcurrentfield function () does not work when you need then labels.
The better way is calculating this fields in script time.

I hope it helps you

Regards

Not applicable
Author

yes i did that already and compid & ' - ' & compdesc as comp will solve this but when i need to display the no of selected by no of total in the caption of list box then then i find this too tough.

If i want to display in list box caption - | Company 5 / 295 ........| then which field is active in this cyclic group is not working properly in getselectedcount() and getpossiblecount() functions.

ex for 5 / 295 i wrote getselectedcount ( getcurrentfield ( " Cyclic Group " )) / getpossiblecount ( getcurrentfield ( " Cyclic Group "), true ). This is not working as i expected.

Not applicable
Author

Try

Count(GetCurrentField("Cyclic Group") ) & ' / ' & Count(Total GetCurrentField("Cyclic Group") )