This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



May 24, 2011, 6:09 PM
298 Posts

I should add ...

  • Category: Other
  • Platform: Windows
  • Release: 8.5.2
  • Role:
  • Tags:
  • Replies: 6
The @DbLookup will return an array only if there are multiple values, so, you probably need to test the returned results to see if it is an array. There is no test in native JavaScript to determine if something is an array, so, it might be easier just to use @Subset. For example, the code below returns the proper value regardless if @Subset is used with an array or just a string:

var arr = new Array("one", "Two", "Three");
var str = new String("Test1");
var first = @Subset(arr, 1);
var firststr = @Subset(str,1);

Howard
May 24, 2011, 9:10 PM
30 Posts
Re: I should add ...
 Sure there's a native way in JS to test is something is an array:
 
if (value instanceof Array) { 
<DoYourThing>
 
Works great. 
 
 
/J 

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal