Jump to content
Server Maintenance This Week. ×

Opening a card window and set a field from a summary field.


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

Recommended Posts

In the script that loads the new layout, and before the new layout is invoked, set a variable to the value of the summary field.

Then after the layout has loaded, set the field to the value of the previously created variable.

set variable $sum = SummaryField
go to layout [layoutname]
set field $field = $sum

 

Link to comment
Share on other sites

i have question regarding the set field part

set field $field=&sum?

did you mean the

set field (summary field)=$sum?

 

I want all the summary sum of each record per account. but it shows the summary field of the entire record of the table.

Link to comment
Share on other sites

You can't set a summary field, summary fields calculate their value based on the current found set.  That's just how they work.  If you want to show the summary of each record you'll need to sort the found set and us a subsummary layout part.

 

Or you'll have to use a regular field and find a way to calculate the desired value yourself.

Link to comment
Share on other sites

On 1/8/2020 at 10:59 AM, Mark Pastoril said:

i have question regarding the set field part

set field $field=&sum?

did you mean the

set field (summary field)=$sum?

 

I want all the summary sum of each record per account. but it shows the summary field of the entire record of the table.

Ah sorry, I made a typo with the set field. It should be "set field [fieldname; $sum]"

You mentioned in the screenshot you wanted to open a new layout and access the summary field of the previous layout (at least that's how I understood it). To do that you first need to copy the value of the summary field into a variable, then switch to the layout.

Then you populate whichever field you need with the summary value from the $sum variable.

Link to comment
Share on other sites

6 hours ago, Mark Pastoril said:

can you give me an example sir, on how to do it?

 

@OlgerDiekstra's explanation takes care of your original request and should be easy enough to put together.

However this mention from you is a totally different ballgame:

I want all the summary sum of each record per account. but it shows the summary field of the entire record of the table. 

We don't have enough context or explanation to know what you want to achieve with that and it doesn't seem to fit with the original question of how to grab a value to display in a new card window. 

Link to comment
Share on other sites

  • 1 month later...

What does "It only shows the PRV" look like?  Sounds like you are expecting the new record to show more data, but you're not setting more data, you're only setting the PRV field.

The last step in the script wouldn't work unless you have a portal named "transactions" on the layout you used for the new window.

 

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.