Skip to main content
Question

how to handle multiple data sources in the lobby data source designer


Forum|alt.badge.img+6
  • Do Gooder (Customer)
  • 20 replies

How do you implement 2 data sources (views) into the lobby data source designer.

 

I want the following code to return the count in the data source.

select distinct(sp.catalog_no)
from lora1app.sales_part sp, 
lora1app.sales_price_part_join splp 
where splp.catalog_no = sp.catalog_no and splp.SALES_PRICE_TYPE_DB = 'SALES PRICES'
and sp.activeind_db = 'Y' 
and (splp.part_valid_to_date >=  (sysdate) or splp.part_valid_to_date is null)
and splp.valid_to_date >=  (sysdate)    

 

 

 

--currently I have gone about it the following way seeing that the data source cannot handle two views:

select distinct SALES_PART.Catalog_NO from SALES_PART  
where SALES_PART.activeind_db = 'Y' and SALES_PART.Catalog_NO  in 
(select catalog_no from  sales_price_part_join where  sales_price_part_join.catalog_no = SALES_PART.CATALOG_NO AND  sales_price_part_join.SALES_PRICE_TYPE_DB = 'SALES PRICES' and (sales_price_part_join.part_valid_to_date >= sysdate or sales_price_part_join.part_valid_to_date is null) and sales_price_part_join.valid_to_date >=  sysdate)
group by SALES_PART.catalog_no

 

both sets of code are returning in PL/SQL with the same count value. but I receive a single row returns more than one record in subquery error. Please advise what I have wrong and why it is working without duplicate records in pl/SQL. Thanks,

4 replies

hhy38
Superhero (Customer)
Forum|alt.badge.img+16
  • Superhero (Customer)
  • 319 replies
  • May 6, 2023

Forum|alt.badge.img+23
  • Superhero (Customer)
  • 1169 replies
  • May 8, 2023

Hi @bpamlin 

unfortunately, you can’t use more than one view/table in a lobby data source.

You can create a IAL or a view for this case.


DHCRADPA
Hero (Customer)
Forum|alt.badge.img+9
  • Hero (Customer)
  • 82 replies
  • May 10, 2023

Create the joint view using IAL like yy38 and Link said earlier and use that new view as the datasource for your tiles.

Sales parts are defined per site, and they can have different prices in different sites. Maybe that’s why you get multiple rows back. Try to restrict your queries to the default selected site (contract). If you need all of them, you could ListAGG in PLSQL multiple rows in one string field if less than 4000 characters in length.


Forum|alt.badge.img+6
  • Sidekick (Customer)
  • 23 replies
  • April 18, 2025

Another way to possibly pull in the data without using an IAL, you can use API’s in the Lobby Data Source Columns section.  For example:

 

I am using inventory_part_api.get_description to pull in the part no description using data in the current view I am pulling from.  This might erase the need for creating an IAL.  


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings