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

Totaling line items in a portal


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

Recommended Posts

Posted

Hey!

I have two questions.

Question 1:

In a portal:

line 1: Blue $100

line 2: Red $ 50.

How can I create a total ($150) for the layout where the portal resides -- preferably outside the portal?

Question 2:

In a portal:

line 1: 5) Process 1

line 2: 3) Process 1

How can I create only one line showing:

line 1: 8) Process 1

Thank you!

Posted

Hi, Merkaba.

Say those $100 and $50 values are in the field Relationship1::Money. You can get the sum with a calc number field defined as ( Sum ( Relationship1::Money ) ). Make sure that Relationship1::Money is a number field.

Similar approach for the second question; whatever that "x)" is must be in a number field. If it must be formatted this way, try making a number calc:


Middle( 

...thatField, 

...Position( 

......thatField, 

......":", 

......1, 

......1 

...) + 1, 

...3 

)

This will return the 3 characters starting from right after the colon. You then might sum those like you did for the first question.

HTH,

J

Posted

I totally got the idea -- thank you!

However, in trying to apply the principle ot the second example I realize that I have over simplified and seek to restate so I make sure how to implement you second suggestion (which, I am not sure I get yet - a poet and I don't know it ..)

Here I go again:

Question 2:

In a portal:

line 1: count2, Process1 (from field4, record5)

line 6: count7, Process1 (from field8, record9)

How can I create only one line showing:

line 1: SUM (count2 + count7) Process1

Man .... should I do a calc field of some nature in the parent file for SUM (count2 + count7) Process1 and then show that in the portal?

Sorry, I think this is a biggie ...

Posted

Your portal will have the same fields on each line, regardless of what the data is, so i am not sure what you mean by "count2" and "count7." What is the name of the field that is displaying these numbers? And can you give us a few samples of the data this field displays?

Posted

The parent file has a series of line item possibilities (driven by a series of identical popup menus for each relative field) comprising a number field and an item field (process 1-9, for example), so that any one record could have any variety of items in their respective fields on any line on a record by record basis.

For example, each record layout comprises number and item fields:

Line1 = number1: item1

Line2 = number2: item2

Line3 = number3: item2

Consequently, this parent file could have 2 process1's entered on Line1 in the 5th record and 7 process1's entered on Line3 of the 9th record.

In a portal:

line 5: 2 Process1 (from record 5, Line1)

line 9: 7 Process1 (from record9, Line3).

I would prefer to see 9 Process1's (2+7 Process1) on one line, say, line 5 ....

Does that clarify my mess?

Posted

So you want to summarize the portal by process name? That is, total numberField when sorted by itemField?

For clarity's sake, please also tell us the name of the relationship the portal is based on, and the names of the fields in that portal.

Posted

The relationship is;

JobNumber:= :: JobNo

Portal fields:

JobNoCreationDate, number1, item1; number2, item2; number3, item3; number4, item4.

Accordingly, there is a line in the portal for the date of a record and the info for the various processes made on that date ...

  • 2 weeks later...
Posted

Yes, that's what I have now -- I am sorry I have not been clearer.

What I need is the total of an item when it randomly appears in say item1 on one date and say item 2 on another date.

Posted

Oh... sorry i missed this on 11/21.

There may be workarounds for this, but i wouldn't recommend them. What you should do is re-design the file where process names appear (still don't know its name! smile.gif) so that process names can appear in only one field. Having the same type of data distributed to multiple fields in the same file (item1, item2, ...) makes summarizing them a bear.

You may consider creating another file for Items, then relating that file to the file that currently contains the fields item1, item2... (that syntax would have been much less tortured had i known the name of the file! smile.gif OK, i'll stop) and creating a calc field in that file that returns the name of the process from the related file.

So your structure:

FILES

-----

Master

Jobs

LineItems

FIELDS

------

Master::someRelatableField

Jobs::relateToMaster

Jobs::JobNumber

Jobs::SelectItemName (text field)

Jobs::JobNumberItemName (calc text field equal to (JobNumber & SelectItemName))

LineItems::JobNumber

LineItems::ItemName

LineItems::JobNumberItemName (calc text field equal to (JobNumber & ItemName))

RELATIONSHIPS

-------------

Master::someRelatableField <==> Jobs::relateToMaster

Jobs::JobNumber <==> LineItems::JobNumber

Jobs::JobNumberItemName <==> LineItems::JobNumberItemName

Once you've done this, you can use that final relationship to get the count you're looking for.

J

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