using lookup() and Code128() functions

For ideas, tips and tricks and comments on using or creating MoneyWorks Forms (invoices, statements, labels etc.),
Forum rules
This forum is not the official Cognito Software support channel for MoneyWorks. If you need help from Cognito, then please contact us (or your local regional support representative) directly using the contact information on the Support page of the web site.

Please try the search facility before posting a new topic to see if your topic has already been covered.

If you do post a new topic, it's a good idea to choose a Topic Subject that it a bit more informative than "Help!" or "A problem". If your topic is actually recognisable by people scanning the forum, you'll have a much better chance of getting a response. Thanks and have fun.
Post Reply
tonedeaf
Posts: 3
Joined: 29 Mar 2012 11:02
Product: Gold
Region: USA

using lookup() and Code128() functions

Post by tonedeaf » 29 Mar 2012 11:20

Hi guys! I work at a solar panel roof mount manufacturing company in California, and I've been programming databases in FileMaker Pro for about 6 months. Now I'm trying my hand at forms design in Moneyworks Gold v.6. Here's my first challenge: I want to customize our "shipping manifest" form to display the value from the text field "Transaction.TheirRef" (which is our customer's Purchase Order number) as a code128 barcode. I see hints on the internet and in the Moneyworks manual that this is possible with the Code128() function, and I've tried and failed with various syntax adjustments. here's what I have done:

In the forms designer, I made an Image box, and in the image box options, I selected to display a barcode. I went into the formula editor, and I tried this calculation:

= Code128(Transaction.TheirRef)

I previewed the form from one of the records, and in place of the barcode, it says "Invalid Encoding. Use Code128() function". I then learned, to have it return the value from that field, I must use the lookup("code", "file.field") function, but for Transaction fields, I must give it the record sequencenumber in place of "code". How do I tell it to look in the current record? this is as far as I've gotten:

= Code128(lookup("???", "Transaction.TheirRef"))

any advice is greatly appreciated!

-Jack

tonedeaf
Posts: 3
Joined: 29 Mar 2012 11:02
Product: Gold
Region: USA

Re: using lookup() and Code128() functions

Post by tonedeaf » 30 Mar 2012 06:16

I just discovered something. In this dialogue, if I simply type "hello" into the formula dialogue, it automatically assumes to encode to Code128 and successfully displays a barcode:

Image

but if I type in the code128() function, it screws it up:

Image

and the result:

Image


so, i'm wondering if i can simply put the lookup() function straight in without embedding it in a Code128() function....and STILL, how do i make the lookup function return a value from a Transaction field in the current record?

Sosu
Posts: 136
Joined: 13 Feb 2012 09:07
Product: Datacentre

Re: using lookup() and Code128() functions

Post by Sosu » 30 Mar 2012 14:19

Try

=Code128("Transaction.TheirRef")

tonedeaf
Posts: 3
Joined: 29 Mar 2012 11:02
Product: Gold
Region: USA

Re: using lookup() and Code128() functions

Post by tonedeaf » 31 Mar 2012 06:54

He-hey!! I got it to work! I had to remove the "", so it ended up being:

=Code128(Transaction.TheirRef) <----that returned the value from the field

=Code128("Transaction.TheirRef") <----that returned the text "Transaction.TheirRef"

Thanks for the tip, Sosu. Apparently the "=" sign was what I was missing. In the formula editor, it displays the "=" next to, but not inside, the formula field, and so i figured it was implied. Little bit of Syntax makes all the difference!

:D

DavidHenderson
Posts: 1
Joined: 28 Nov 2013 21:47
Product: Datacentre
Region: Singapore

Re: using lookup() and Code128() functions

Post by DavidHenderson » 03 Dec 2013 17:32

tonedeaf wrote:Hi guys! I work at a solar panel roof mount manufacturing company in California, and I've been programming databases in FileMaker Pro for about 6 months. Now I'm trying my hand at forms design in Moneyworks Gold v.6. Here's my first challenge: I want to customize our "shipping manifest" form to display the value from the text field "Transaction.TheirRef" (which is our customer's Purchase Order number) as a code128 barcode. I see hints on the internet and in the Moneyworks manual that this is possible with the Code128() function, and I've tried and failed with various syntax adjustments. here's what I have done:

In the forms designer, I made an Image box, and in the image box options, I selected to display a barcode. I went into the formula editor, and I tried this calculation:

= Code128(Transaction.TheirRef)

I previewed the form from one of the records, and in place of the barcode, it says "Invalid Encoding. Use Code128() function". I then learned, to have it return the value from that field, I must use the lookup("code", "file.field") function, but for Transaction fields, I must give it the record sequencenumber in place of "code". How do I tell it to look in the current record? this is as far as I've gotten:

= Code128(lookup("???", "Transaction.TheirRef"))

any advice is greatly appreciated!

-Jack


Hello friend are you still mounting solar panels on the roof? I am working on similar project and need you guidance.. Can you help me out? Sorry for posting in old thread but I hope you will reply.

Post Reply