third_party_content:community:commentary:forums_nonworks:17d05e2f05bcdc878525671d001131e8

Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 18 FEB 1999 10:07:48PM Tom Howard wrote:

I am trying to display the values of RoutingNo from a Bank Table.

Bank Table Key=ComapnyNumber and BankNo

I also the same fields in my employees table ====]Emp.EFT

My failing formular is as follows:

@Ans=xlate("BANK.TABLE", {COMPANYNUMBER}*{BANKNO},"ROUTINGNO","X")

I will appreciate it if someone could show me how to do this correctly. I do not know where my problem lies.

Thanks

Tom


At 19 FEB 1999 02:05AM Warren Kinny (EXODUS Systems) wrote:

Tom,

Looks like you need quotes around your * in the Key. Otherwise you are

multiplying company number by bank number !

I think you want {COMPANYNO}:'*':{BANKNO}.

regards

Warren Kinny

warren@resmaster.com


At 20 FEB 1999 05:17AM Kevin Gray wrote:

Your code is subject to confusion in interpretation

You use :-

@Ans=xlate("BANK.TABLE", {COMPANYNUMBER}*{BANKNO},"ROUTINGNO","X")

We would set a new variabls , say ANS1={companynumber}

then another varaible, say ANS2={bankno}

then combine them thus:-

ANS3=ANS1:'*':ANS2

Set another variable ANS4={routingno} then use them thus:-

@Ans=xlate("BANK.TABLE",ANS3,"ANS4","X")

This would significantly simplify your code and have predictable

response.

Kevin Gray

GRAYCORP

email keving@graycorp.com.au


At 21 FEB 1999 07:46PM Chris Vaughan wrote:

I seem to have missed your point entirely.

Could you please explain what possible benefits might flow from introducing four extra variables with meaningless names?

The original problem seems to me to be entirely about confusion between concatenation and multiplication when forming the multi-part record key.


At 21 FEB 1999 09:33PM JB wrote:

I agree with Chris. Anyway this code:

]]Set another variable ANS4={routingno} then use them thus:-

]]@Ans=xlate("BANK.TABLE",ANS3,"ANS4","X")

wouldn't work becasue you have quotes around ANS4, thus the xlate function would treat it a literal.

The original query simply was confusion over concatenation.

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/17d05e2f05bcdc878525671d001131e8.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1