NetTalk Central

Author Topic: Need embed point for calculations, please  (Read 10043 times)

PeterPetropoulos

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • Email
Need embed point for calculations, please
« on: February 09, 2025, 01:17:57 PM »
My API Rest server is correctly gathering and reporting records to the client.

I need to perform calculations on the records being sent, such as accrued interest.

In which procedure, at what embed point should I make those calculations, please?

Jane

  • Sr. Member
  • ****
  • Posts: 383
  • Expert on nothing with opinions on everything.
    • View Profile
    • Email
Re: Need embed point for calculations, please
« Reply #1 on: February 09, 2025, 08:09:13 PM »
As a starting point, I'd try this embed.
 

PeterPetropoulos

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • Email
Re: Need embed point for calculations, please
« Reply #2 on: February 10, 2025, 05:07:16 AM »
The API returns 1 parent and 8 child records.
I put a debug statement in there to show me the number of the returned record.

The embed appears only once when I'd expect it to appear 9 times, and the record number it shows is zero.

I've put debug messages in about 20 places, and while they appear, they all show a zero record number.

Do you have another suggestion, please?  :-)

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11275
    • View Profile
Re: Need embed point for calculations, please
« Reply #3 on: February 10, 2025, 05:35:21 AM »
You're returning a VIEW. This is a client-side structure, which is populated by server-side values.
It's not possible to inject "local variables" (ie calculations) into a VIEW. At least not in the way you imagine.
I think this might be a question better answered in the webinar on Thursday.

PeterPetropoulos

  • Newbie
  • *
  • Posts: 8
    • View Profile
    • Email
Re: Need embed point for calculations, please
« Reply #4 on: February 10, 2025, 11:58:38 AM »
I understand what you're saying.
I'm accustomerd to updating a VIEW after it's been built, and I had that confused with building the VIEW.

I look forward to a discussion on Thursday, but I won't wait till then.

If a VIEW won't work, maybe a QUEUE will be better.

Will test and report.

Thank you.