Solved

Filemaker Portal running line total

Posted on 2011-03-18
2
949 Views
Last Modified: 2013-12-26
Hi,

I am only just above a newbie Filemaker hacker.

I need some advice re portals.

I have written a cashbook that has 2 tables: accounts and transactions

The transactions appear in the portal for deposits and withdrawals

The columns displayed are:  date, type (deposit/withdraw etc), payee, payment, deposit and balance (at time of transaction)

The parent account details show actual balance at all times.

Inputs are straight forward and work well.

Now, I can edit the transaction (deposit or withdrawal) ad have the portal line balances all reflect a change if a monetary amount changes, no matter which portal line was edited.

However, changing date and having the portal then resort on date and reflect line balances to alter with that date has me tossed.

For example.  Say on line 6 of a portal you had a date entry of Jan 1, 2011 and a deposit of $1,000 showing a line balance at that time of $15,000.

What happens if the entry needs to be edited to June 1, 2010 , that is moving the entry to say line 2 on the portal.  How can I get the line balance to now reflect what it should have been based on the previous line

On a spreadsheet this is easy.  Do I really need to go and trap the previous line (in this case line 1) and start a whole new calculation script . A screen photo is attached

I guess what I need is a calculation for the field holding the line balance that will update based on the line above, a sort of running balance.  Is there an easy way to do that please??

Cheers

Jim
cashbook.png
0
Comment
Question by:jim_pilot
  • 2
2 Comments
 

Accepted Solution

by:
jim_pilot earned 0 total points
ID: 35169372
Hi,
after doing a few hours or research in various forums I have found this script works perfectly both for editing and amount plus a date change in my layout portal.

I have attached a screen shot in case it helps someone else.

By way of explanation:  the Parameters table fields are all global fields that I use instead of variables.

so for example, Parameters: param_adjust is a number global field that I use to trap the line balance of the row above the active row.

The DividendsShareEntry is a TOC with various fields storing payment, deposit and the line balance.

It was easier than I thought possible.
Thank you Mr Filemaker.
Cheers

Jim





script.jpg
0
 

Author Closing Comment

by:jim_pilot
ID: 35169373
Hi, I was able to suss this problem out by studying various forums.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The following is a collection of cases for strange behaviour when using advanced techniques in DOS batch files. You should have some basic experience in batch "programming", as I'm assuming some knowledge and not further explain the basics. For some…
Over the years I've spent many an hour playing on hardened, DMZ'd servers, with only a sub-set of the usual GNU toy's to keep me company; frequently I've needed to save and send log or data extracts from these server back to my PC, or to others, and…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question