Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 6280 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

Did you try creating a calc like.

Case ( RecordID = GetNthRecord ( SelfJoin::RecordID; Get ( RecordNumber ); gHighlightImage )

Posted

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

Posted

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.

Posted
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.
Posted

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

Posted

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.

Posted (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 by Guest
Posted

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?

Posted

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

Posted

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.

Posted

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.

Posted

Does this work for you?

Ah yes it was the stacking I had wrong, but what is it then Jason means??

--sd

Posted

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.

Posted

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

  • 1 month later...
Posted (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 by Guest
Posted (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 by Guest
Posted

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--

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.