elvis_impersonating_penguin Posted December 19, 2000 Posted December 19, 2000 is there a way when view a database in a list view to have a button, that only appears on the record that is selected and not on every record... just wondering..
Chuck Posted December 19, 2000 Posted December 19, 2000 No. But perhaps there is another way to do what you want. I was about to suggest having the script linked to the button check to see if the user clicks on the current record, but by clicking on another record, the user would make that record the current record. What exactly to you want to do? Chuck
spragueg Posted December 19, 2000 Posted December 19, 2000 Make a global container field "gButton" and paste in you desired button image. Make a global number field "gCurrentRec" Make a calculation field "cDrawButton" and place it where you want the button to appear. Use the following for the calculation... -- If (Status(CurrentRecordID)=gCurrentRec, gButton, "") -- Make a script "SetCurrentRecord" Set Field ["gCurrentRec", Status(CurrentRecordID)] Assign that script to a button that completely covers one record line in list view and send it to back. Now eachtime you click in a record it will tell the calculation to draw the button in the selected record. Please note that this only will work if you don't allow entry into the fields in the list. If you do allow entry into a field the user will not be clicking through to the "SetCUrrentRecord" button and the selected record will not have the button you are looking for. I still recommend this method due to the fact that it is bad design to allow users to enter data in list view. Reply if you have any trouble. Good luck, G [This message has been edited by spragueg (edited December 19, 2000).]
elvis_impersonating_penguin Posted December 19, 2000 Author Posted December 19, 2000 let me rephrase what i want to do... i dont know why i said i needed a button in my last post.. (guess i hadn't had my morning coffee yet) i have done a little research on what i want to do.. havent figured it out.. but now i can explain it.. i want to have a container field i guess, and when the record is selected than the image in the container field shows up.. if it record isnt selected than nothing shows up.. it is kind of a way of showing the person what record they are clicked on when they are in list view... it is not important but with what i am doing it will look kinda cool if i can do it... i was thinking of using a calculation field that kinda said.. if this record is the selected record than show the image, if not than dont show the image.. does that make a little more sense???
elvis_impersonating_penguin Posted December 19, 2000 Author Posted December 19, 2000 quote: Assign that script to a button that completely covers one record line in list view and send it to back. if i did this i wouldn't be able to edit any of the fields would i? because you couldn't click on them if they are covered with a button??? ok.. didnt see that last part... i will give it a try and see what happens.. i am a little new however, and havent done much with global fields and such. [This message has been edited by bman (edited December 19, 2000).]
spragueg Posted December 19, 2000 Posted December 19, 2000 -----if i did this i wouldn't be able to edit any of the fields would i? because you couldn't click on them if they are covered with a button??? ------- It is bad design to allow users to enter data in list view. You should create a form for entry/edit. Place a button like an arrow on the left side of the list view to take the user to the edit layout where you do allow entry. On the entry/edit layout place a button that returns you to list view. G
elvis_impersonating_penguin Posted December 19, 2000 Author Posted December 19, 2000 actually.. i just realized, that won't work.. because they wont always be clicking in on the record to get to it.. i have buttons that move to the previous and next record.. and if they use those than it they wont actually be clicking on the record.. i wish you guys could see the database so i could show you what i am trying to do.. because when i explain it, it makes no sense at all.. but when you look at it, it suddenly starts to make sense as to why i am doing things that you wouldn't normally do with a database... oh well.. its not an important thing.. it is just something to make it easy on the eyes.. if it is gonna be alot of trouble i probably wont even worry with it.. [This message has been edited by bman (edited December 19, 2000).]
Ocean West Posted December 19, 2000 Posted December 19, 2000 Try this Serial gSerial gContainer cContainer [if(gSerial=Serial,gContainer,"") Create a script: Set field:gSerial,Serial This will only flag the record you are on. In your navigation scripts always perform the set field script after you go to the record. REMEMBER: THE SERIAL FIELD MUST BE UNIQUE!!! Hope this helps... S [This message has been edited by Ocean West (edited December 19, 2000).]
spragueg Posted December 19, 2000 Posted December 19, 2000 Make a global container field "gButton" and paste in you desired button image. Make a global number field "gCurrentRec" Make a calculation field "cDrawButton" and place it where you want the button to appear. Use the following for the calculation... -- If (Status(CurrentRecordID)=gCurrentRec, gButton, "") -- Make a script "SetCurrentRecord" Set Field ["gCurrentRec", Status(CurrentRecordID)] Assign that script to a button that completely covers one record line in list view and send it to back. Now eachtime you click in a record it will tell the calculation to draw the button in the selected record. Reply if you have any trouble Thanks G
BobWeaver Posted December 20, 2000 Posted December 20, 2000 Unfortunately, these all fail if you command-tab to the next record.
Chuck Posted December 20, 2000 Posted December 20, 2000 Every technique I've seen to do this requires a script. If that's satisfactory, take a look at this link: ftp://ftp.fmfiles.com/download/devhaven/tipstricks/layout/HighlightDeluxe.FP3.zip Chuck
Recommended Posts
This topic is 8741 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now