For the following table of records, I need to be able to calculate the total of the highlighted columns, (Bid Amount & Principle Balance) so that I can utilize that information to create a list of metrics listed below the Picture.
Discussion posts and replies are publicly visible
Well, the sum() function can do that for you.
Can you explain how though because I tried that and it didn't work. It's not as simple as entering =sum(recordtype!dcloans.fields.principlebalance) somewhere? Or even if it is, where would you use that formula?
Well. You need to use the actual values, not just a reference to some field in a record.
=sum(local!YOUR_DATA[recordtype!dcloans.fields.principlebalance])
Ok, I know this is a pain, but I am still trying to learn this stuff and I am really under the gun here so I could really use some hand holding here. To start, where would you create that local variable to capture the principal balance data? And would it be local!principalBalance?
Next question would be, where would you put that sum formula to display the result?
The variable you are using to hold the grid data use that same variable in the sum function and for referencing the field to be used inside sum we use recordtype!recordName.fields.columnNameOnce you type recordtype! you will get the necessary fields.(The above solution is when you are using records to fetch data, in case using cdt use index function inside sum instead index(arraywithdata,"columnName",{})
I need to be able to display all this information on a reports interface, so can't I create some sort of GetPrincipleBalance query that grabs all that data from the various records and then utilize that result in a sum function somehow?
You'd have to retrieve the info in a query (separate from the grid) and put it in a local variable.
You would put whereever you need to display it. In a grid field sourced by Record Data it's a little tricky. I would suggest creating a small area under your grid to display the sums/balances etc.
Something that looks like this maybe?
docs.appian.com/.../data-value-display.html
docs.appian.com/.../reference-records.html
Ok, so let's forget about the picture of the grid that I posted, seems maybe that is throwing things off track, I only posted that to show that I have records of info I need to pull from. What I am trying to create is an interface, with some sort of components on it that will display the result of pulling the record data from the Principle Balance and Bid Amount fields and total each. There won't be any grids of data on the interface to use a local variables for or any data entry to be made. I just need to pull the data that has already been entered during the creation of the records, hence the query record idea? Does that make more sense or less?
It is really difficult to follow you...
Maybe you want to start with a separate expression rule that uses a!queryRecordType to fetch and aggregate the data. Tune it so it creates the output you expect. Use the Query Editor to get started.
Once this is done, find a way to display that data to the user.
I have this following query which that kind of gives me the result I want (pictured below) but how do I mold the expression so that I can use the result to sum the balances?
a!queryRecordType( recordType: 'recordType!{6e4edeaf-030d-4fc2-917a-ab20f1027418}DC Loans', fields: { 'recordType!{6e4edeaf-030d-4fc2-917a-ab20f1027418}DC Loans.fields.{fc4aaffb-28af-4b3f-bd19-a59e7625372b}principalBalance', }, pagingInfo: a!pagingInfo( startIndex: 1, batchSize: 100, sort: a!sortInfo( field: 'recordType!{6e4edeaf-030d-4fc2-917a-ab20f1027418}DC Loans.fields.{fc4aaffb-28af-4b3f-bd19-a59e7625372b}principalBalance', ascending: true ) ) ).data