The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum
 Origin Forum
 Calculation of cell values with column parameter

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
maxm22 Posted - 08/09/2018 : 12:02:57 PM
Origin Ver. and Service Release (Select Help-->About Origin): 2018b
Operating System: Win10

Hello guys,

I'm currently using a column user parameter in order to calculate column values. However if I am changing the user parameter it doesn't update the calculation. Is there any workaround for that via a labtalk script?

Regards Max
6   L A T E S T    R E P L I E S    (Newest First)
Hideo Fujii Posted - 08/13/2018 : 12:32:00 PM
Hi maxm22,

We will fix the problem of unstable triggering with the change of the column header label by cleaning
the cache in the next release. We're sorry for the inconvenience caused by the bug.


ORG-18030-P2

--Hideo Fujii
OriginLab
maxm22 Posted - 08/10/2018 : 3:48:26 PM
Hello Chris D,

it's pretty much same with F5.

changing the value -> nothing happens
pressing F5 -> nothing happens
pressing F5 again -> cell value updates

There is also another weird thing I have noticed. When I am executing the following line

cell(1,2) = "=C1*0.01*value(A[D4]$)+(1-C1*0.01)*value(A[D1]$)";

directly with importing a file, the cell(1,2) doesn't show the corresponding int value but the string expression behind it (=C1*.... ). However when I am executing the line via the command window once I have imported my data, it will actually display the desired int value calculated from line above.

Regards Max
Chris D Posted - 08/10/2018 : 2:39:54 PM
Hi maxm22,

When this happens, try hitting F5 (which refreshes the window). Does that update the display of the calculated value?



Thanks,
Chris Drozdowski
Originlab Technical Support
maxm22 Posted - 08/10/2018 : 11:34:14 AM
Hello guys,

thank you for your replies! It works indeed as mentioned by cpyang, however there is one issue left for me.
I am also using expressions like the following:

cell(1,2) = "=C1*0.01*value(A[D4]$)+(1-C1*0.01)*value(A[D1]$)";

And with that, updating the parameter D1 or D4 won't always change the cell value. Sometimes I have to re-enter the parameter D1/D4 several times in order to get an updated value in cell(1,2). Perhaps anyone knows a fix for that.

Regards Max
cpyang Posted - 08/09/2018 : 7:39:16 PM
I tried in 2018b the following and it works fine, so need more details on why it didn't work for you, as column label row changes should trigger recalculate.

1. add user parameter, so I can access the first using D1
2. fill column A with row numbers
3. put the following formula into column B.
A+value(A[D1]$)

I then see values in B filled in and I can change the values in my column A user parameter and see recalculate updated.

So can you put your user parameter on a column that is not your calculated column, which is considered the output and will not be considered for input change?

We do have a JIRA about this, ORG-18805, hopefully we can address this in our next version.

CP
Hideo Fujii Posted - 08/09/2018 : 2:29:31 PM
Hi maxm22,

Issuing the following command triggers all recalculation in the active worksheet:
run -auf 0 1;
Note that recalculation mode won't be set unless it has a reference to the other column even when it's a dummy one.

https://www.originlab.com/doc/LabTalk/ref/Run-cmd#-auf.3B_Trigger_all_recalculation

Hope this works.

--Hideo Fujii
OriginLab

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000