Skip to main content

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,

You have to use IAL object. You cant use directly. Please check links links below.

 

https://docs.ifs.com/techdocs/Foundation1/010_overview/255_br_and_a/070_information_access_layer/default.htm

 

https://docs.ifs.com/techdocs/Foundation1/040_administration/255_br_and_a/060_information_access_layer/default.htm

 

https://hasanyucel.com/ifs-erp-ial-nesnesi/


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.


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.


Reply