tv_kid Posted July 13, 2007 Posted July 13, 2007 I'm sure this must be simple, but I can't figure it out and am going a bit crazy! I have a portal that shows records from a self-join relationship. I want to devise a calculation that automatically highlights the current record in the portal list. I don't want to use a script to do this. Can anyone help? Thanks
mr_vodka Posted July 13, 2007 Posted July 13, 2007 Did you try creating a calc like. Case ( RecordID = GetNthRecord ( SelfJoin::RecordID; Get ( RecordNumber ); gHighlightImage )
Agnès Posted July 13, 2007 Posted July 13, 2007 Hello, without script, I am not sure that is a good idea, but one can do it thanks to a variable. if I understood your question, here an example, if not, my excuses Agnès TestHighlight.fp7.zip
tv_kid Posted July 13, 2007 Author Posted July 13, 2007 Hi John and Agnes, and thank you for your speedy responses. John, I had tried a calculation like you suggested, but was coming unstuck as I couldn't make it work in a separation model setup. Agnes, I had tried a method like you suggested, but hadn't thought that I needed to put the variable on the layout in question, for it to update. That has solved my problem, merci beaucoup! Thanks again
comment Posted July 13, 2007 Posted July 13, 2007 Putting it in the header is a neat idea. Another option is to put it in the portal itself - but it must 'in the back' relative to the hilight calculation, so it evaluates first.
Agnès Posted July 13, 2007 Posted July 13, 2007 Another option is to put it in the portal itself - but it must 'in the back' relative to the hilight calculation, so it evaluates first. I try to put the variable in the portal, I must badly do it, because is not good for the first and the second card but ok for all the other cards, I dont understand why.
Søren Dyhr Posted July 13, 2007 Posted July 13, 2007 This is because it should touch a part of the layout where you would expect a re-rendering ...take a look at this: http://www.kevinfrank.com/download/county-highlight-in-portal.zip But if you put it so it touches one of your containerfields is it giving a ugly flashing portal, so I would suggest a webding bar instead, since it requires less resources to render. Take a look at my modification! --sd TestHighlightmod.zip
comment Posted July 13, 2007 Posted July 13, 2007 I try to put the variable in the portal, I must badly do it Make sure the field is from the CURRENT TO, not from the related TO. it should touch a part of the layout where you would expect a re-rendering I don't think this is necessary.
Søren Dyhr Posted July 13, 2007 Posted July 13, 2007 (edited) But there is a problem if it doesn't ....then is recordnumber not highlighting anything, and then recordnumber highlighting two rows! Or you have to leave the cursor in the sniffer-field, DeLouze is right about it, as far as I can see?? --sd Edited July 13, 2007 by Guest
mr_vodka Posted July 13, 2007 Posted July 13, 2007 Does this work with the seperation of data and interface though? I thought he had said that he was using the seperation model. The local variable is only file specific, so how would this work?
Agnès Posted July 13, 2007 Posted July 13, 2007 Does this work with the seperation of data and interface though? I thought he had said that he was using the seperation model. The local variable is only file specific, so how would this work? In network, there is no problem, but I dont know enough seperation of data and interface, I have just tried on 2 files (testHighligt And another file, Interface), and that also does it.....however the dataviewer does not show the variable $Num, but the color changes line well, even if the file data is closed. it is necessary to test I think before adopting. Thank You Saren for this calcul, I know it, and I like it much ! Agnès
mr_vodka Posted July 14, 2007 Posted July 14, 2007 Perhaps I am missing something? Could you be so kind to demonstrate how it was achieved? TestHighlight_seperate.fp7.zip
comment Posted July 14, 2007 Posted July 14, 2007 But there is a problem if it doesn't .... Does this work for you? TestHighlightmod.fp7.zip
comment Posted July 14, 2007 Posted July 14, 2007 I don't quite understand the setup of your file. The variable "publishes" the current data record. Changing the current record in the viewer table is a non-event for the data file. You would have to be on a layout based on the data file in order for it to have any meaning.
mr_vodka Posted July 14, 2007 Posted July 14, 2007 That is exactly my point. It wouldnt work in the case of a true seperation model of interface and data unless an event or scripted process triggered the calc to refresh in the data file or a layout of the data file.
Søren Dyhr Posted July 14, 2007 Posted July 14, 2007 Does this work for you? Ah yes it was the stacking I had wrong, but what is it then Jason means?? --sd
comment Posted July 14, 2007 Posted July 14, 2007 I am having difficulty understanding your point. If your interface file has a layout based on the data file, and you are on that layout, it would work exactly the same. The calculation would be defined in the data file, and the self-join relationship would be defined in the interface file. If you are not an a layout based on the data file, then the original question becomes meaningless. It would be so even without separating the files.
Agnès Posted July 14, 2007 Posted July 14, 2007 I hope to have very understood, here a data_interface example. Thanks Michael, indeed, with the variable in the portal "in BackWard" it's ok even on the first and the second records (no cards as I wrote!) thank you everyone Agnès Data_Interface_Highlight.zip
Lexan Posted September 7, 2007 Posted September 7, 2007 (edited) 'sorry for the double post, during the editing some finger flew away without control! Please substituite the original zip file with this last, in the previous one I left some unnecessary old parts! Stefano Lesandrini FSA/FBA Member TestHighlight_SepMode.zip Edited September 7, 2007 by Guest
Lexan Posted September 7, 2007 Posted September 7, 2007 (edited) Agnés replied with the better technique you could use at that time, but by now, using FileMaker 9 you do not need any trick in order to highlite the current portal row. Use instead conditional formatting! Take a look at the attachment. (Separation Model Solution) Stefano Lesandrini FSA/FBA Member TestHighlight_SepMode.zip Edited September 7, 2007 by Guest
Saubs Posted September 14, 2007 Posted September 14, 2007 Lexan, I am interested in your technique of using conditional formatting to highlight a portal row. I'm not using the separation model in my solution though; Using your last demo file as an example, would I need to change anything in order to make it work in a non-separation model situation? Many thanks--
Lexan Posted September 14, 2007 Posted September 14, 2007 It's easy to do! 1) Open the interface file and import the only one existing table from the data file: File-Manage-Database-Tables-Import...) 2) Go2 File-Manage-Database-Relationship and change the data source of the two related TOs "TestHighlight" from the data file to the interface file. 3) Populate the new table with some data... /Stefano
Recommended Posts
This topic is 6280 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