Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Calculation problem

Calculation problem 7 years 5 months ago #6172

  • Charles
  • Topic Author
  • Offline
  • Junior Boarder
  • Junior Boarder
  • Posts: 28
  • Thank you received: 0
I am struggling to get some basics working. Here are some questions that I need help with.

1. I need to set an accountname field. It will be the source companyname field unless it is blank then it would be set to the source lastname field. I am trying to use a calculation transformation and have the following code:

if Trim([F002])='' then
Result := Trim([F001])
else
Result := Trim([F002])

I get a very unhelpful error message: "Expression expect but 'if' found." Since the whole point of the logic is an if statement (pretty much the exact structure of what is in the manual) I do not understand the message at all.

The second question - do you have a function to convert a date / time value to an unix timestamp?

Charles

Please Log in or Create an account to join the conversation.

Re: Calculation problem 7 years 5 months ago #6176

  • admin
  • admin's Avatar
  • Offline
  • Moderator
  • Moderator
  • Deeds not Words
  • Posts: 7839
  • Karma: 33
  • Thank you received: 472
Try this

begin
if Trim([F002])='' then
Result := Trim([F001])
else
Result := Trim([F002]);
end

Peter
Mike

Please Log in or Create an account to join the conversation.

  • Page:
  • 1

We have 151 guests and no members online