Bill Great suggestion but it does not seem to work with Buttons, I am using Enhanced Speed buttons and they do not take focus so that Var shows the last ID. If I click on 2 different fields that have ID's it works fine.
O'well, I can always edit 300 Button EEP's Thanks Marc From: Bill Downall Sent: Monday, July 26, 2010 2:16 PM To: RBASE-L Mailing List Subject: [RBASE-L] - Re: Get component ID Marc, There's a system variable that may be of help: >From "Help > Reference Index > Reference Topcs > System Variables" ยท RBTI_FORM_COMPID This variable holds the value of focused DB/Variable Edit control's Component ID, if defined. Bill On Mon, Jul 26, 2010 at 3:06 PM, Victor Timmons <[email protected]> wrote: I cant quit remember just how I did it but a few years back I wrote a calendar that would put the componentid of the lable into a table and what its value should be. Then I grabbed the ComponentID and its new value from this table and updated the caption using a cursor. Victor Timmons Tiz's Door Sales, Inc Visit us at www.tizdoors.com P Please consider the environment before printing this e-mail -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of MDRD Sent: Monday, July 26, 2010 5:04 AM To: RBASE-L Mailing List Subject: [RBASE-L] - Re: Get component ID Thanks Mike I knew I could hard code that into each Button but I have close to 300 buttons. I have 6 Tabs with 50 buttons each. so I was trying to find a better solution. Marc -------------------------------------------------- From: "Mike Byerley" <[email protected]> Sent: Friday, July 23, 2010 4:48 PM To: "RBASE-L Mailing List" <[email protected]> Subject: [RBASE-L] - Re: Get component ID > The point is that at design time, you already know the componentID of > the button, so in the onClickEEP, just do a Set Var vCompID text = > 'WhateverTheComponentIdIs' then in your CFA, you can use a long Switch > / Endsw for each CompID in the 50. > > ----- Original Message ----- > From: "MDRD" <[email protected]> > To: "RBASE-L Mailing List" <[email protected]> > Sent: Friday, July 23, 2010 4:31 PM > Subject: [RBASE-L] - Re: Get component ID > > >> Hi all >> >> Sorry for using the wrong term by button name I should have said >> Caption and I am sorry I a not explaining this very well. >> I have 50 buttons like >> ABC1 ABC2 ABC3 >> ABC4 ABC5 ABC6 >> ..... down to 50 >> >> I have 4 buttons V1, V2, V3, V4 that allow the user to change the >> Caption name of the button to something like >> Q1040 Q1030 Q1050 >> or whatever the user likes, When the user clicks on V1 I do a cursor >> that renames the Captions. This allows the user to rename the >> Captions to match his charge codes. and 50 buttons can have 200 >> unique Captions for entering 200 different charges without having 200 >> buttons on the Form. >> >> My table that stores the Original button Caption name and V1-V4 looks >> like this in a Grid >> Original Ver1 Ver2 Ver3 Ver4 >> ABC1 Q1040 >> ABC2 Q1030 >> ABC3 Q1050 >> .... >> ABC50 >> >> You do not have to have a row for each button, When the user pops up >> this Grid to rename the Captions for V1 it is a mess to have all the >> rows show up and the user has to scroll to find the correct Original >> name to modify V1 or they have to Add a row for that Button. >> >> To tell the truth, I have 50 buttons on an Enhanced tab that has 6 >> tabs so I really have hundreds of rows in this Grid making this a >> real mess. >> >> So, I can't read the Caption name since it is being "renamed" I need >> to be able to capture the Component ID then pop up a simple form with >> just 1 row and V1-4 so they can rename that 1 button. >> >> I would be happy to send a screen shot of the form if it would help. >> Please don't pull your hair out on this, I currently have a working >> solution but it is not very elegant. >> >> Thanks for all the feedback >> Marc >> >> >> >> >> >> >> -------------------------------------------------- >> From: "Mike Byerley" <[email protected]> >> Sent: Friday, July 23, 2010 2:45 PM >> To: "RBASE-L Mailing List" <[email protected]> >> Subject: [RBASE-L] - Re: Get component ID >> >>> What Jan is saying is you would create the Grid with the count of >>> buttons, etc and use that to create buttonX at runtime. >>> >>> If your Grid is a map of ComponentID to partnumber or such, why >>> can't you just change the caption of the button. You can do that at >>> runtime or does the Caption have to say something else special? >>> >>> Getproperty ComponentIDofButton CAPTION 'vCaption' >>> >>> >>> ----- Original Message ----- >>> From: "MDRD" <[email protected]> >>> To: "RBASE-L Mailing List" <[email protected]> >>> Sent: Friday, July 23, 2010 3:21 PM >>> Subject: [RBASE-L] - Re: Get component ID >>> >>> >>> Jan >>> >>> I never knew you could create Buttons on the fly, would that get >>> messy if the user is allowed to create buttons at will? >>> >>> Thanks >>> Marc >>> >>> >>> >>> From: jan johansen >>> Sent: Friday, July 23, 2010 2:07 PM >>> To: RBASE-L Mailing List >>> Subject: [RBASE-L] - Re: Get component ID >>> >>> >>> Marc, >>> >>> You should be able to do what you want but slightly differenent way. >>> You have the ability to create "objects" on the fly. So on each row >>> clik of your grid, create the button you want with the properties >>> you want. >>> >>> Jan >>> >>> >>> >>> -----Original Message----- >>> From: "MDRD" <[email protected]> >>> To: [email protected] (RBASE-L Mailing List) >>> Date: Fri, 23 Jul 2010 13:53:01 -0500 >>> Subject: [RBASE-L] - Re: Get component ID >>> >>> >>> Hi Mike >>> >>> I hope I can explain this.... >>> I have a form with 50 buttons that we use to enter charges on a >>> customers account, The component ID and Button names are the same >>> at this point. >>> >>> I have a Custom Form Action that gets the Button name, then >>> matches that button name with a look up code in another table. If >>> a charge codes matched the button name a charge is entered into >>> the invoice. >>> >>> We allow the user can rename the button names so they can match a >>> lookup code that they have in the charge code table. I allow 4 >>> different versions for the button names. If I have a button named >>> ABC1, with a Component ID of ABC1, the user can rename the button >>> to a current charge code in their DB, lets say version 1 would be >>> SP123 which is a spark plug. >>> Now, they can also rename that ABC1 button to Q1040 for version 2 >>> which = Quaker state 10/40 oil... and so on. When the user clicks >>> that button the CFA looks up the current name of the button >>> matches it to a charge code .... and we insert the charge.. >>> >>> Everything works great so far, now the problem I have a grid where >>> the user types in the Original button name in 1 column, then the >>> new button names in Ver1, Ver2, Ver1 and Ver4. This grid layout to >>> rename the buttons makes it hard for the user to manage the button >>> names. All the buttons pop up and they have to scroll down to >>> find the original button name for the button they want to modify. >>> >>> So, I would love to be able to Right click on each button and let >>> the user modify and add new button names for the different >>> versions but that is not possible. >>> >>> So, my second thought was to have an Edit ckbox, if that box is >>> checked and if I could "read" the component ID of a button I could >>> pull up a form with just that 1 row showing so they could modify >>> that button. >>> >>> Really everything is very slick up to the point on how to Edit the >>> button names. >>> >>> Thanks >>> Marc >>> >>> >>> >>> >>> >>> >>> -------------------------------------------------- >>> From: "Mike Byerley" <[email protected]> >>> Sent: Friday, July 23, 2010 1:05 PM >>> To: "RBASE-L Mailing List" <[email protected]> >>> Subject: [RBASE-L] - Re: Get component ID >>> >>> > Would you care to rephrase the question? The button that is >>> being > clicked, in its' own eep, you would already know its' >>> componentID at > design-time, so you should be able to do whatever >>> you want with it in the > EEP. Also, to get the property of the >>> button that contains the > componentID, you would need the >>> ComponentID for use in the GetProperty > command that would obtain >>> it, so it's a non-starter (what you are >>> asking) >>> > as I understand it. >>> > >>> > >>> > >>> > >>> > ----- Original Message ----- >>> > From: "MDRD" <[email protected]> > To: "RBASE-L Mailing >>> List" <[email protected]> > Sent: Friday, July 23, 2010 1:47 PM > >>> Subject: [RBASE-L] - Get component ID > > > > I need to get >>> component ID of a Button when it is clicked. >>> > I thought I knew how to do this but I can't seem to figure it out >>> today? >>> > >>> > I looked at RBTI variables and Getproperty commands but still >>> can't > remember how to do this. >>> > >>> > Thanks >>> > Marc >>> > >>> > >>> >>> >> >> > >

