• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 986
  • Last Modified:

Filemaker Portal running line total

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
jim_pilot
Asked:
jim_pilot
  • 2
1 Solution
 
jim_pilotAuthor Commented:
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
 
jim_pilotAuthor Commented:
Hi, I was able to suss this problem out by studying various forums.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now