Help using Base SAS procedures

PROC INFOMAP - adding dynamic values to text prompt

Reply
Occasional Contributor
Posts: 7

PROC INFOMAP - adding dynamic values to text prompt

Environment: SAS BASE 9.4,  EG   7.15 HF3 (7.100.5.6132) (64-bit)

 

I am trying to add a text_prompt to an Information Map using:

 

insert text_prompt
displayed_text="Select Code:"
name="CODE"
id="codePrompt"
selection_type=single
value_displayed=yes
allow_user_values=no
column="table_name"."column_name";

 

2 problems !!!

 

1) Cant get the syntax for column= correct (wont execute to create Information Map , always get "cant find table" no matter what referencing I try)

 

2) If I use dataitem= as in 

 

insert text_prompt
displayed_text="Select Code:"
name="CODE"
id="codePrompt"
selection_type=single
value_displayed=yes
allow_user_values=no
dataitem="dataItemID";

 

The map creates OK  and I can use in EG but it WILL not display the dynamic list of possible prompt values.

 

Any help appreciated 

Community Manager
Posts: 3,441

Re: PROC INFOMAP - adding dynamic values to text prompt

Does your "table name" reference contain the full folder path of the infomap, as in this example from the doc?

 

insert text_prompt
   displayed_text="Select countries that apply:"
   id="countryPrompt"
   value_displayed=yes
   allow_user_values=yes
   column="/Shared Data/CUSTOMER"."Country”
      label_column="Postal_Code" /format=”custom-format”
   default_values=('CANADA' 'GERMANY');insert 
Occasional Contributor
Posts: 7

Re: PROC INFOMAP - adding dynamic values to text prompt

Posted in reply to ChrisHemedinger
I have tried all sorts of path referencing options for both the COLUMN= and DATAITEM= options but cannot get values to show in the prompt when using the Information Map:
1) DATAITEM=

/* Insert a data source */
insert datasource sasserver="SASApp"
table="libr name".TABLE_NAME;

insert dataitem
column="TABLE_NAME"."COL_NAME"
id="codeId"
folder="folder name";

insert text_prompt
displayed_text="Select Code:"
name="CODEID"
id="codePrompt"
selection_type=single
value_displayed=yes
allow_user_values=no
dataitem="codeId";

- this code executes but the prompt show no values when used
- any attempt to provide full path of dataitem in code does not execute

For example:
insert text_prompt
displayed_text="Select Code:"
name="CODEID"
id="codePrompt"
selection_type=single
value_displayed=yes
allow_user_values=no
dataitem="/Shared Data/InformationMaps/map_name/folder name/codeId";

ERROR [ com.sas.iquery.metadata.MetadataException: The specified value column/data item "/Shared Data/InformationMaps/map_name/folder name/codeId" cannot be found. ]

- syntax error for every path name permutation I can think of:
"/Shared Data/InformationMaps/map_name/folder name"."codeId"
"/Shared Data/InformationMaps/map_name/folder name.codeId"
etc

2) COLUMN=

/* Insert a data source */
insert datasource sasserver="SASApp"
table="libr name".TABLE_NAME;

insert dataitem
column="TABLE_NAME"."COL_NAME"
id="codeId"
folder="folder name";

insert text_prompt
displayed_text="Select Code:"
name="CODEID"
id="codePrompt"
selection_type=single
value_displayed=yes
allow_user_values=no
column="TABLE_NAME"."COL_NAME";

- this code executes but the prompt show no values when used
- any attempt to provide full path of column in code does not execute

For example:
insert text_prompt
displayed_text="Select Code:"
name="CODEID"
id="codePrompt"
selection_type=single
value_displayed=yes
allow_user_values=no
column="TABLE_NAME"."COL_NAME";

[ com.sas.iquery.metadata.MetadataException: The specified external table TABLE_NAME cannot be found. ]

- same error for every path name permutation I can think of:
"TABLE_NAME.COL_NAME"
"Libr name"."TABLE_NAME"."COL_NAME"
"Libr name"."TABLE_NAME.COL_NAME"
"Libr name.TABLE_NAME.COL_NAME"


Thanks



Community Manager
Posts: 3,441

Re: PROC INFOMAP - adding dynamic values to text prompt

Do you have the option to use SAS Information Map Studio to define a prompt the way that you want it, and then use PROC INFOMAPS and the INFOMAP libname engine to see how it's defined (to inform your coding)?  See some tips in this blog post.

 

 

Occasional Contributor
Posts: 7

Re: PROC INFOMAP - adding dynamic values to text prompt

Posted in reply to ChrisHemedinger
No. I am trying to do this without Studio.

Thanks
Occasional Contributor
Posts: 7

Re: PROC INFOMAP - adding dynamic values to text prompt

I have tried the following and it works fine:

 

insert text_prompt
displayed_text="Select CODE:"
name="CODEID"
id="codePrompt"
selection_type=single
value_displayed=yes
allow_user_values=no
values=(("200000" "Chosen") ("1"));

Occasional Contributor
Posts: 7

Re: PROC INFOMAP - adding dynamic values to text prompt

Still cant get it to work.

New Contributor
Posts: 2

Re: PROC INFOMAP - adding dynamic values to text prompt

Kindly read this , if any help. http://support.sas.com/kb/36/193.html

 

Occasional Contributor
Posts: 7

Re: PROC INFOMAP - adding dynamic values to text prompt

Thanks for the info. I am using EG 7.1 and Base SAS 9.4 so the prompted filters should work. 

 

Thanks

New Contributor
Posts: 2

Re: PROC INFOMAP - adding dynamic values to text prompt

no worries.

 

Did you got your problem solved? if so please let me know the solution.

Occasional Contributor
Posts: 7

Re: PROC INFOMAP - adding dynamic values to text prompt

No solution yet, I have a track open with SAS Support. I will let you know.

 

Thanks

Ask a Question
Discussion stats
  • 10 replies
  • 284 views
  • 1 like
  • 3 in conversation