Code for searching for a row in a series object?
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
Code for searching for a row in a series object?
Is it possible to search/filter through a series (containing character data) and isolate one row? Something similar to the Filter feature in Excel or an SQL query? I'm very new to EViews and I know this must be a programmable solution. Any help is appreciated. :D
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Code for searching for a row in a series object?
What do you want to do with the result? What's the end goal?
Re: Code for searching for a row in a series object?
The series data serves as a "directory" for data. Mnemonic codes are linked to their full names. I'd like users to be able to query a code and identify what it means. So the end goal is 1 row being displayed.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Code for searching for a row in a series object?
Not sure what you mean by "one row". One row of what? Of the series? Isn't that pointless - it will just contain the value you're looking up.
Perhaps you mean of a group?:
Perhaps you mean of a group?:
Code: Select all
!lookupval = 0.56
smpl if x = !lookupval
show mygroup
Re: Code for searching for a row in a series object?
The object in question is an alpha series. It may potentially have over 10,000 rows so I would like a user to be able to run a command and find the row that they are looking for based on a given value for the identifier column.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Code for searching for a row in a series object?
Well if you just want to show them something:
Code: Select all
%lookupval = "hello world"
smpl if a=%lookupval
show a.sheet
Re: Code for searching for a row in a series object?
So there are a few more details to my problem now.
A user would actually want to find the Identifier value using the value in another (non-identifier) column.
The problem is that the user will not type in the exact value in that column so we will have to use wildcards when using their input.
Is this possible? This is my problem in pseudocode if that helps.
%lookupval = "substring of actual value"
smpl if a LIKE %lookupval
show Identifier on the same row as 'a'
A user would actually want to find the Identifier value using the value in another (non-identifier) column.
The problem is that the user will not type in the exact value in that column so we will have to use wildcards when using their input.
Is this possible? This is my problem in pseudocode if that helps.
%lookupval = "substring of actual value"
smpl if a LIKE %lookupval
show Identifier on the same row as 'a'
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Who is online
Users browsing this forum: No registered users and 2 guests
