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.

To create a script that produces an invoice

Featured Replies

  • Newbies

I have setup an invoice file that has relationship to my product file. When I enter item # into the Item field (which is a portal) that item's price and description shows up in the invoice file's description and price field. I have to type each item # / copy paste it in. How do I make a script that will retrieve a list of item # from a text field separated by commas(or symbols) and insert each item into a field within the portal list thus making me an invoice? Thanks for any input!

are you creating new records for each item on the invoice? if so...

put the item numbers into a table "tblImportInvoice". Create a value list on that table's item# field called "vlImportInvoices". Write the (bound to be buggy somewhere) script:

##  Import Invoices

#

# Description: After loading invoice item numbers into the tblImportInvoice table, run this script to create your invoice

#

##

##

If [ IsEmpty ( Get ( ScriptParameter ) ]

# First Pass through the script ...

# get the found count and load it into ScriptParameter, so we can keep track

# of how many invoice items we've added

Go to Layout [ myInvoice ]

Go to Field [ tblInvoice::Primary_key_field ]

# ...tblInvoice is the proper table in the invoice file

Enter Find Mode []

Insert From Last Visited [ Select ; tblInvoice::Primary_key_field ]

Perform Find []

Perform Script [ thisScript ; GetAsText ( Get ( FoundCount ) ) ]

Else

# Second Pass, Loop the value list and add invoices

Loop

# foundcount - scriptparameter = place in value list index / number of added items

Set Field [ <item # field> ; Substitute ( MiddleValues ( ValueListItems ( Get ( FileName ) ; "vlImportInvoices" ) ; ( Get ( FoundCount ) - Get ( ScriptParameter ) + 1 ) ; 1 ) ;

the set field loop should have a Commit after it and a New Record before it. frown.gif there's also some typos but otherwise I think that's it.

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.