Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 22 FEB 2001 09:19:50AM Ian Newman wrote:

To everyone,

Can someone help?. I've created an Edit Table with 3 columns (all multivalue). One column calculates the other 2 columns. I have used a very simple formula i.e.

@ans={column1} +++ {column2} * 4 This works for the first line but subsequent lines do not calculate. If I take away the multiplication it works. Any help would be appreciated. Ian Ian.Newman@waterers.co.uk </QUOTE> —- === At 22 FEB 2001 10:14AM Oystein Reigem wrote: === <QUOTE>Ian, The problem is that these mv operators (+++, *, etc) don't work with single values. You need to make that single 4 into an array of identical values 4, with the same amount of elements as {column1} and {column2}.

In Arev there was a Reuse function, so you could do

@ans={column1} +++ {column2} *** Reuse(4)

This function doesn't exist in OpenInsight, as far as I know. You must convert your single value the hard way. See .

- Oystein -

PS.

What about the following:

@ans={column1} +++ {column2} +++ {column2} +++ {column2} +++ {column2}

:-)


At 22 FEB 2001 10:22AM Don Miller - C3 Inc. wrote:

Ian / Oystein

The "other" hard way is:

@ans={column1} +++ {column2} ;* to the MV stuff

k1=count(@ANS,@VM)+(@ANS # "")

Method 1:

for i=1 to k1

tmp=@ans*4  ;* single value multiplication
@ans=tmp

next i

Method 2:

tmp=str(4:@vm,k1) ;* make an mv variable containing a string of 4's

tmp-1,1=' ;* remove the last vm

tmp1=@ans+++tmp ;* do mv math

@ans=tmp1

Don Miller

C3 Inc.

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/1ee9f47142fbc59f852569fb004eb85c.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1