BookmarkSubscribeRSS Feed
dosborne
Fluorite | Level 6

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 

11 REPLIES 11
ChrisHemedinger
Community Manager

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 
Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!
dosborne
Fluorite | Level 6
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



ChrisHemedinger
Community Manager

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.

 

 

Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!
dosborne
Fluorite | Level 6
No. I am trying to do this without Studio.

Thanks
dosborne
Fluorite | Level 6

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"));

dosborne
Fluorite | Level 6

Still cant get it to work.

dosborne
Fluorite | Level 6

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

 

Thanks

suhaneyr
SAS Employee

no worries.

 

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

dosborne
Fluorite | Level 6

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

 

Thanks

FK1
Lapis Lazuli | Level 10 FK1
Lapis Lazuli | Level 10

Hi @dosborne : has SAS Support finally resolved your problem with the prompt ?

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 11 replies
  • 1571 views
  • 1 like
  • 4 in conversation