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 for Programming
 LabTalk Forum
 Column Formula: using sheet name issue

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
AKazak Posted - 07/19/2022 : 01:34:19 AM
OriginPro 2023 (64-bit) Beta 2 10.0.0.58
Windows 7 Pro SP1 x64

Greetings!

I want to get a column with sums of rows (starting from column 2) in wks 1.

The following code works correctly:
sum(FirstSheetName$!,2,0)
string FirstSheetName = [%H]1!layer.displayname$;


However the following code:
sum([%H]1!layer.displayname$!,2,0)

or
sum(%([%H]1!layer.displayname$)!,2,0)

returns a column of "--".

What is the reason for this?
How do I use the LT phrase returning the 1st sheet name directly?

Thank you.

---
Andrey
5   L A T E S T    R E P L I E S    (Newest First)
AKazak Posted - 07/25/2022 : 1:36:59 PM
quote:
Originally posted by minimax

Hi AKazak,

We will try to fix the problem you found.

But as to your case, you can just use following much simpler formula
sum(1!,2,0)


PS, layer.displayname$ is obsolete now. You can use layer.name$ directly.



Got it!
Thanks.

---
Andrey
minimax Posted - 07/25/2022 : 04:54:03 AM
Hi AKazak,

We will try to fix the problem you found.

But as to your case, you can just use following much simpler formula
sum(1!,2,0)


PS, layer.displayname$ is obsolete now. You can use layer.name$ directly.
YimingChen Posted - 07/19/2022 : 2:39:23 PM
Jira created: ORG-25530
AKazak Posted - 07/19/2022 : 12:04:22 PM
quote:
Originally posted by YimingChen

I can reproduce the issue. It is working in script e.g. col(A) = sum(%([%H]1!layer.displayname$)!,2,0). But not working in SCV dialog. Is there reason you don't define the sheet name string in the Before Formula Scripts panel, and pass it to the formula?

James



Dear James,

I tend to use BFS panel as less as possible and compose a complicated formula. Can you create a JIRA ticket for the issue, please?
In the meantime I will be using the script suggested by you above or my script from my original post.

---
Andrey
YimingChen Posted - 07/19/2022 : 10:41:31 AM
I can reproduce the issue. It is working in script e.g. col(A) = sum(%([%H]1!layer.displayname$)!,2,0). But not working in SCV dialog. Is there reason you don't define the sheet name string in the Before Formula Scripts panel, and pass it to the formula?

James

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