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.

Newbie question-Referencing Row - Repeating Fields

Featured Replies

Hello,

In the body of my "Invoice Form", I used a 30 row Repeating Field to contain the following data:

LN - Line Number (I enter it manually, for now)

SKU - or Product ID - manually entered for now, integration of Barcode Reader in the future.

DESC - Short Product Description

CAT - Category (Value List, I can choose CPU, HD, MB, Sound Card, etc., or edit & add.)

QTY- Quantity

UP - Unit Price

EP - Extended Price

This part of the form works fine.

I then added, at the bottom of the same layout, a short, 5-line set of nearly identical repeating fields, to track items that have to be returned.

In this set, I want to merely enter a number into a new field, RLN (return Line Number), which references the "LN" of the product purchased above, using:

GetRepetition( field , RLN )

to fill in rest of the Returned Item's data.

But I can only seem to get this to work on the FIRST line of "Returned Items", which it does, correctly. Entering an RLN on any subsequent line does nothing; I have to enter the data manually or copy/paste.

Can someone help me with this?

TIA

AC, is RLN a text field or a number field?

Jerry

If it's text, you'll need to use GetRepetition(field, RLN) & ""; if number, GetRepetition(field, RLN) + 0.

  • Author

QuinTech

Thanks for taking an interest! Your time is appreciated.

RLN is a number, which references the line number (LN) of the item in the main invoice I need to return.

I was feeling froggy, since the first part of my effort, using the default Purchase Order Template that FMv6 provides as the foundation for my Purchase Invoices DB, had gone so smoothly.

So I figured I'd be able to use:

GetRepetition( field , RLN )

where "field" would represent, in sequence, all the fields for one item, across any one row of the Main Invoice, referenced by the 1 to 1 rel between RLN & LN.

And it does work perfectly, but only for the first item I enter in the Returns portion.

Any other item has to be entered manually, or copy/pasted, field by field.

I tried everything I could think of to get past this glitch. But FM has humbled me, as I'm sure it often will. But I'm having a lot of fun with it, believe me.

After all the hours I spent trying to get a program called "Formtool" to work , FM has really got me enthused again, especially after seeing the fantastic examples of creativity that folks have posted on the web!

  • Author

-Queue-,

I replied to QuinTech's query before I saw your post.

Please let me extend my thanks to you, also!

I will definitely try your solution, and let you know tomorrow how it works for me.

But if you don't mind my asking, exactly what the modifiers & "" and and + 0, for text and numbers respectively, define for the GetRepetitions calculation?

TIA,

aaeros

  • Author

-Queue-

Your advice cleared the roadblock. Thanks.

In implementing it, I assumed that you meant that if the RESULTS of the calculation:

GetRepetition(field, RLN)

- were numeric, I'd need to follow with & ""

- were text, I'd need to add +0

After making the appropriate changes, the full automation of filling in the referenced fields took over.

Although I'm not clear as to why! But now that you've made me aware of these two modifiers, I've noticed them used in other templates and am beginning to grasp how they work.

Is there a book or URL you could recommend that would supplement the help files for someone at my beginning level, explaining important syntax options such as these?

Thanks Again,

aaeros

It's a glitch workaround actually. See here for a bit more info.

You need to flip your results though. For text results, use & ""; for numeric results, use + 0.

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.