Jump to content

Help creating a find script.


Recommended Posts

  • Newbies

Hello to you all, my first post here. Mac OS Catalina FMP 15 

I’m stuck on a script to make a find!  I’d really appreciate some help having gone round in circles for a while.

I have 7 fields on 1 table. Among them "Ledger" (There are 6 ledgers), "Account" (There are 20 accounts) and many "Category". The rest are, Date, Detail, Credit and Debit.

I am hoping to make a find that shows all the related fields from a selected Ledger, showing only the records for the account selected and the category selected. And a button "Go" that runs the find script and shows a list of the result.

I have 3 buttons available on the Layout’s header section.

They set the "ChooseLedger" field with a dropdown list of the Ledgers, the "ChooseAccount" field with a dropdown list of the  Accounts, and the "ChooseCategory" field with a dropdown list of the Categories.

The results fields are on the body section.

Thanking you in advance.

Henry

Link to post
Share on other sites

Assuming that "ChooseLedger", "ChooseAccount" and "ChooseCategory" are global fields, you could do simply:

Enter Find Mode []
Set Field [ YourTable::Ledger ; YourTable::ChooseLedger ]
Set Field [ YourTable::Account ; YourTable::ChooseAccount ]
Set Field [ YourTable::Category ; YourTable::ChooseCategory ]
Perform Find []

 

Link to post
Share on other sites

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.