cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper III
Helper III

Using set instead of lookup

Hi All,

 

I've recently changed all my lists to use lookups so the ID's are stored in one table and if names of items change it will be reflected anywhere the item is used. Took a bit to work it out but It's mostly done now. The issue is, that now it has completely destroyed the usability because the page takes forever to load and refresh when data is added. 

 

So on doing some reading I think my best option is to use Set() on page load to lookup the items but I need a bit of help. I'll try my best to explain with a screenshot.

 

All the modules and items on the left come from their lookup tables. On the right, the data is being pulled from a mapping table which only has ID's, and is based on the package dropdown. When I change dropdown it takes forever, or crashes. When I try to app more items from the left to the mapping table (and therefore what's listed on the right), it takes forever and crashes. So I tried this code on page visible:

 

Set(vModule, LookUp(Modules, crb20_module_id = ListBox1.Selected.crb20_module_id, crb20_module));

 

Then added the module name as ThisItem.vModule

 

It just says name isn't valid, this identifier isn't recognised.

 

Can someone help please?

 

Modules.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Helper III
Helper III

I solved it concurrent 🙂

 

On page load:

Concurrent(
ClearCollect(vModule, Modules),
ClearCollect(vItem, Items),
ClearCollect(vMapping, Mapping)
)

Then used the new lists which are cached when the page loads.

View solution in original post

1 REPLY 1
Helper III
Helper III

I solved it concurrent 🙂

 

On page load:

Concurrent(
ClearCollect(vModule, Modules),
ClearCollect(vItem, Items),
ClearCollect(vMapping, Mapping)
)

Then used the new lists which are cached when the page loads.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (7,840)