Hi everyone,
Instead of looping through series in a group, I am trying to loop through all groups in a workfile. Something along the lines of:
for !i = 1 to wf.@groupcount
%n=wf.@groupname(!i)
'do something here with %n
next
Is this possible?
Thanks for your reply
Looping through groups in a workfile
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Looping through groups in a workfile
Code: Select all
%grouplist = @wlookup("*", "group")
for %n {%grouplist}
...
next
-
fboehlandt
- Posts: 83
- Joined: Thu Apr 15, 2010 3:54 am
Re: Looping through groups in a workfile
Great, thanks very much. I shall give this a try
-
fboehlandt
- Posts: 83
- Joined: Thu Apr 15, 2010 3:54 am
Re: Looping through groups in a workfile
Hi Gareth,
I still have a problem with implementation:
This works fine:
This, however, returns "Syntax error in FOR %N"
Any thoughts on this?
Thanks
I still have a problem with implementation:
This works fine:
Code: Select all
%seriesname = @wlookup("*", "series")
for %n {%seriesname}
nextCode: Select all
%grouplist = @wlookup("*", "group")
for %n {%grouplist}
nextThanks
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Looping through groups in a workfile
Is your copy of EViews up to date?
-
fboehlandt
- Posts: 83
- Joined: Thu Apr 15, 2010 3:54 am
Re: Looping through groups in a workfile
Not sure, what version has this increased functionality for @wlookup?
-
fboehlandt
- Posts: 83
- Joined: Thu Apr 15, 2010 3:54 am
Re: Looping through groups in a workfile
sorry, just ran the update. Working fine now. Should not post questiosn resulting from out-of-date Eview copies. mea culpa
Thanks again
Thanks again
-
fboehlandt
- Posts: 83
- Joined: Thu Apr 15, 2010 3:54 am
Re: Looping through groups in a workfile
Quick one:
I need to reference the name of the group that is currently selected:
Thanks once again
I need to reference the name of the group that is currently selected:
Code: Select all
%grouplist = @wlookup("*", "group")
for %n {%grouplist}
%string1 = 'here groupname
next-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
-
fboehlandt
- Posts: 83
- Joined: Thu Apr 15, 2010 3:54 am
Re: Looping through groups in a workfile
Duh! of course, got it now. thanx
Who is online
Users browsing this forum: No registered users and 2 guests
