Idea Details

Fill array from VARA row or column using :FILL and GET_VAR

Last activity 13 days ago
Michael Lowry's profile image
04-13-2018 04:40 PM

There is currently no way to use :FILL for anything truly practical. It seems like a good idea that was only partially implemented.

It would be nice if one could do something like this:
:SET &MYVARA# = "UC0.PROFILES.VARA":DEFINE &ARRAY#, string, 25:FILL &ARRAY#[] = GET_VAR(&MYVARA#,COLUMN,KEY)
or
:SET &MYVARA# = "UC0.PROFILES.VARA":DEFINE &ARRAY#, string, 25:FILL &ARRAY#[] = GET_VAR(&MYVARA#,COLUMN,VALUE1)
or
:SET &MYVARA# = "UC0.PROFILES.VARA":DEFINE &ARRAY#, string, 25:FILL &ARRAY#[] = GET_VAR(&MYVARA#,ROW,"ABC")
The second parameter specifies whether to obtain multiple values from a single column or from a single row.

This idea originates in a discussion forum thread from January 10th, 2017.


Comments

05-18-2018 12:48 AM

To avoid breaking the current behavior of GET_VAR, perhaps the best way to implement this feature is simply to add a new script function called GET_VAR_COL that retrieves one or more values from a specified VARA column.

05-18-2018 12:48 AM

Great idea!

I have a similar request using the :FILL command to write in a specific field of the array:


Greetings