Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Looping through a value list

Featured Replies

Hi all

In an order database i need to pull out some statistics namely how many of each products was sold by our different sales persons. The result should be something like:

Pete; Product_001; 2 pieces

Pete; Product_002; 5 pieces

Brian; Product_001; 5 pieces

Brian; Product_002; 3 pieces

etc.

Seller is in a value list and product is in a product number field where the productnumber is increased by 100 for each iteration eg. 101, 201, 301 etc.

I need to figure out how to loop through the value list containing the sellers (whith Get(ScriptParameter) maybe?)for one product and then go to next product and do the same seller loop.

Any little clue that could point me in the right direction would be appreciated.

Thanks

Thomas

It's not clear what exact loop you want.

Just guessing...

Create a relationship from a global gSeller to the Table where your "Products sold by" are stored, through a relationship gSeller::Seller.

Create a Value List named "ProductsBySeller" using this relationship and returning the ProductIds.

Each of your sellers can be parsed through a loop from the ValueListItems(Get(FileName);"MySellerList") and passed to gSeller.

Then in turn, each of your Products for this gSeller can be parsed through a sub-loop from the ValueListItems(Get(FileName);"ProductsBySeller")

HTH

I'm not sure why you want to do this with a value list. It's probably easier to use a columnar report with sub-summary parts to summarize data.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.