Solved

Button Name Label Change Formula Anomoly

Posted on 2007-12-04
3
449 Views
Last Modified: 2013-12-18
Great Strange Question for everyone.
I have a formula for a button so that based upon a DBlookup, the button name changes each time it's pushed based upon the return value of the prior push.  Here is the name label formula.
key := CMsub_sys + "PkgApprovals" + @Middle(CMpkgID;2;2) + CMpkg_status;
@DbLookup(""; ""; "CMapprovals";key; "CMstat_to")

The problem is.  The return values can have a value like  CM_APPROVAL (with the underscore).  When the button is displayed the name that appears is CMAPPROVAL no underscore.  However in the actual lookup and the view and the value in the form that creates the view the underscore is there as part of the fields actual value.
Why is the underscore being removed in the button name display ???
Real strange.
Thank you
Paul
0
Comment
Question by:pratigan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 22

Accepted Solution

by:
Bill-Hanson earned 250 total points
ID: 20406508
Underscore is a special character in several development environments when dealing with menu items and buttons.  Normally, you add an underscore before the letter that will be used as a hotkey for the action.  For example, if you were adding an "Edit" item for a menu (or button), you would probably name it "_Edit" so that the users could press ALT+E to activate the item.

To retain the underscore as part of the label, just double it using @ReplaceSubstring.
0
 
LVL 31

Expert Comment

by:qwaletee
ID: 20408906
Hit the nail on the head.  Notes uses underscore as part of form names, agent names, etc., to indicate that the following letter is an accelerator for the menu.  Agents work that way in the ACTION menu.  The Action menu consists of the following elements:

1) Fixed, context-sensitive elements that are controlled by Notes itself, not the template. For example, whena document is highlighted, tghe LOCK DOCUMENT item on the action menu is automatic.

2) All agents in the tenplate

3) All ACTION BUTTONS in a view, form, or subform

Because of item #3, Notes wants to offer the developer an option to specify the accelerator key for the action name. So, wherever you place the first underscore in the name, it is not interpreted as an underscore to be displayed in the name, but as an indicator that the next letter following should be underlined in the menu, and treated as a hotkey within that menu.

Note that you can't change this behavior even if you elect for the action to be treated ONLY as a BUTTON and NOT on the action menu.

The seocnd as subsequent underscores are not given special treatment, so Bill's advice will work. I'm only epxlaining why this is so.
0
 
LVL 4

Author Comment

by:pratigan
ID: 20411742
Hello Bill,
Your absolutely correct.  I did some further testing yesterday after posting the question and I worked with different special characters and I found the resultant to be exactly what you explained.  I have already incorporated the doubling of the underscore which resolved the issue.
Thank You both for your feedback !!
Happy Holidays !!
Paul
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How do I delete a user in IBM Lotus Notes 2 214
Domino Application - View Refresh on Subform 15 101
IBM Domino web server 5 77
Inconsistent date field in Lotus Notes 6 102
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question