Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

  • Newbies
Posted (edited)

Hi,

This is my first post ever, I need help creating Find script for invoice program.I have 3 invoice tables, Invoice1,Invoice2,Invoice3...each table has unique field "voucherNo.", On the startup page i would like to have 1 field where users could enter voucher number and hit Find button.it would take them to appropriate layout.invoice1,2 or 3

I dont even know how simple it is?but i am stuck here.Can anybody help me please in this matter. Thank you

ATLEAST LET ME KNOW IF ITS POSSIBLE

Edited by Guest
Posted

Wow, from your description your data model is very wrong. I'm hoping it's simply a misuse of terminology.

You would NEVER have three TABLES for invoices in a solution.* I'm hoping that you mean three records all in the same Invoices table. Sounds like you want the user to Find a VoucherNo, and go to that found record. That's very easy.

See this Help topic: Finding Records

Also, this thread may help: Find Script

*I'm sure someone will come up with an exception.

  • Newbies
Posted

Thank you for your response...Let me describe my situation.

Every "purchase order" should generate many vouchers(unique voucher number),lets say 3 maximum.

Each voucher could have many invoice numbers.

Lets say there is Purchase order of 800 $. first voucher they prepare is for 400.This amount is divided into 2 invoice numbers for 2 products,200 for each.

Some time later they create another vocuher(voucher number) and invoice number for 200..and so on..

So i have 1 layout and i added tabs for purcahse order,voucher1,voucher2 and voucher 3.everything is working except that i would like to put 1 field for all 3 (voucher numbers) at start up screen.and let users to enter voucher number.it could be for "voucher1" tab,"voucher2" tab or "voucher3".

I have created 1 global field for all 3 voucher numbers.and a FIND button assigned this script

set field[global;""]

enter find mode[]

set field[voucher1;global]

perform find

go to object[voucher1]

This works but when i try to add more script steps for voucher 2 and voucher 3 thats where i get lost.

Hope i explained myself.thank you for your time and help in advance.Really Appreciated

Posted (edited)

I was right, your data model is wrong. Sorry.

If a Purchase Order has many Vouchers and each Voucher has only one PO, then you need a Voucher table. Each Voucher will have in its record the foreign key for its parent PO.

Now, since each Voucher can have many Invoices, and each Invoice only references one Voucher (is that true?), then you need an Invoice table, and each invoice record in the table will have a foreign key for its parent Voucher.

You can have a layout for the Customer that has a tab panel. One tab panel can show in a portal the related POs (relating CustID to foreign CustID in PO). A second tab can be a portal to Vouchers (vouchers can lookup the CustID from its parent PO so that you can build a direct relationship from Cust >Voucher without "going thru" POs). Same thing for the next portal of Invoices.

Invoices have more than one line item; new table InvLI. Each InvLI record will have a foreign key for the ProductID. Products is another table.

Edited by Guest

This topic is 5425 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.