Jump to content

calculation based on values from a portal


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

Recommended Posts

I hope I'm posting in the right place.

Here's the problem i'm trying to solve:

I have an Invoice table related to a SpecialPricing table (one to many relationship). In the invoice layout i have a portal that displays related records from SpecialPricing.

Bu here's the thing... I need a field "zField" in the Invoice table that gets a specific value depending on the records that show in that portal. something like this:

zField = if in the records displayed in the portal row you find item 1 or item 4 then put X if you don't find item 1 or item 4 then put Y.

Now maybe there's a simple solution to this but i can't figure it out... what i thought was: can i do a calculation field that "adds" (concatenates) all the items displayed in the portal and then to a patternFind on that concatenation field... but i don't know if i can concatenate that text... i know i can count the rows or sum numbers up but i can't concatenate text.

Ideas?

Link to comment
Share on other sites

never mind... seems like i can concatenate that stuff in the portal using the List function:

List(SpecialPricing::Item Name)

and then i'll do the PatternCount() to see if the items exist in the portal...

Now the second problem is this: If the item is in the portal row (found by ItemName for example) how do i get the ItemPrice for that item?

Link to comment
Share on other sites

Item price is in SpecialPricing table? It is my understanding that you should base the calculations in the SpecialPricing table and then display them in your invoice table.

Like a total for the order: in your invoice table you have a field that does Sum(SpecialPricing::ItemCost) and that would sum all of the related records in the SpecialPricing table and would display it in your invoice table.

Also what happens if you have Item 1 and Item 4 in the portal?

Link to comment
Share on other sites

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