Why doesn't @Prompt show me what is in names?

Someone else wrote this code, but it wasn’t working:

Names ;= @DBLookup(“”; ServerName : RefCCG; “($People)”; DraftAuthorsLF; 2);

I tried adding a prompt command so I could see what was in Names, but Notes just skips that prompt. It runs all the others I add to check other values but never that one. I figured it wasn’t working because DraftAuthorsLF is a text list, so it wasn’t finding a match of all the names together. Also, the ($People) view probably doesn’t work either. The first column is just the alphabet (A-Z) - a directory of names. I tried changing the view to a different one, but the prompt still gets skipped. Then I tried the following code:

@For(n:= 1; n <= @Elements(DraftAuthorsLF); n := n + 1;

@Do(lookfor := DraftAuthorsLF[n];

@Prompt([Ok]; “Value of lookfor”; lookfor);

getNames := @DbLookup(“”; ServerName : RefCCG; “People”; lookfor; 4);

@If(@IsError(getNames); @Prompt([Ok]; “Error”); “”);

allNames := allNames : getNames;

@Prompt([Ok]; “Value of Names”; allNames)));

My intent was to look for each name individually and then string them together in a list. But the prompt forallNames still doesn’t work. The one for lookfor does however. Any ideas? Thanks

Subject: Why doesn’t @Prompt show me what is in names?

Hi Kevin,

firstly, the original formula has no chance of working because there is a semi-colon instead of a colon after Names.

Secondly, in order to display a list with a prompt, you need to convert that list to a string - so your prompt line should read:

@Prompt([Ok]; “Value of Names”; @Implode(allNames; ", ");

This will give you the contents of the list with values seperated by a comma and a space.

hth

Tony