@dblookup not returning multiple values

I have an @dblookup:

xswitchMembers := @DbLookup(“Notes”:“NoCache”; “”:“names.nsf”; “(TorexGroupDataLookup)”; “TS”; “Members”);

That uses a hidden view. It throws an error that says the view doesn’t exist. Can I not use hidden views in formula language? I have used them successfully in script before?

If I unhide the view, I no longer get the error(Would prefere the view hidden) but yet, I do not get all of the members of the group, just the first entry! Any help appreciated.

Stymied

Subject: RE: @dblookup not returning multiple values

You can use a hidden view in @DbLookup, and it will return multiple values if there are multiple values to be returned. This has been true since the dawn of time, and is still true in 6.5.4.

The reason your lookup didn’t work when the view was hidden, is that you were somehow using the wrong name for the view (assuming you have summarized the error correctly; I much prefer to see the actual error text rather than your interpretation). I would look at whitespace within the view name. If you think the parens might be tripping you up somehow, use an alias. But names with parens work just fine. If in doubt, copy and paste.

The reason you don’t seem to be getting multiple values back, is that @Prompt, given a list as input, only displays the first element. So, rather than:

@Prompt([ok]; “some title”; xswitchMembers)

try

@Prompt([ok]; “some title”; @Implode(“'” + xswitchMembers + “'”; ", "))

Subject: RE: @dblookup not returning multiple values

Hey Andre,

Thanks for the feedback. I got the view to work.

Once I knew the @prompt wouldn’t put the entire list out I put the code in to my column and I was good.

You were right about the whitespace in the view name.

Cheers,

Shawn