Jump 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.

conditional increment in import

Featured Replies

i need to import records from one file (A) to another empty file (:. The file A contains compant records with orders. what i need to do is to have conditional increment whereby the increment occures only if the company number is different. all records for company id ? will have the same record id incremented.

i need the increment to be done only if the company id is different on imports.

can any help with this?

thanks

  • Author

in imports the script could be

increment on record 1

if company id is equal to previous record copy the increment value from previous record.

elseif next record has a different company id then increment by 1.

in a loop evaluate all records.

can any one help with this?

thanks

You need to steps in this process:

- import all the records you need, just as they are

- then loop through the imported found set and apply your logic in a loop script.

store the "company ID" and "recordID" in a global, then go to the next record and check their companyID against the global.

If they are the same, change the record ID of that record to the one in the global

If they are not the same, update the 2 globals to the values of the companyID and recordID of the current record

Create an account or sign in to comment

Important Information

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

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.