Jump to content

Newbie question-Referencing Row - Repeating Fields

This topic is 7140 days old. Please don't post here. Open a new topic instead.

Recommended Posts


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?


Link to comment
Share on other sites


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!

Link to comment
Share on other sites


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?



Link to comment
Share on other sites


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,


Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 7140 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...

Important Information

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