October 28, 200817 yr I am trying to highlight multiple entries in a portal by using conditional formatting. So far, I can only get it to highlight one row at a time. Does anyone have any suggestions on how to make this work? Thanks!
October 29, 200817 yr Newbies describe the situation. Is your portal making reference to the right table ? it sounds you have not define the common fields correctly.
October 29, 200817 yr Author I basically followed the following directions for Highlighting Rows in Portals: http://fmcollective.com/2007/08/17/conditional-formatting-tips/ So that works fine, but I would really like users to be able to highlight as many items as they want. Does that make sense?
October 29, 200817 yr You need to keep multiple ChildID values in the $$variable, separated by carriage return. The formula to apply the highlight would then be: not IsEmpty ( FilterValues ( $$variable ; ChildID ) and your script would need to be modified to append the ChildID to the $$variable (and, I suppose, to remove it if it's already there). --- BTW, the example you point to uses: not IsEmpty($$selected) and ( child::id = $$selected ) which is rather redundant: there is no way that the second test can be true while the first one is false, and vice versa.
October 29, 200817 yr I have modified a sample file that I created last year to show how you can highlight portal rows. Modified Highlight Portal Row
October 29, 200817 yr Author I tried adding $$variable rather than $$selected, but it is still only allowing me to highlight one row at a time. I want people to be able to hit a button that will highlight any rows that they want to stand out. See example here: Maybe the past post answers this, but I am not getting it. Sorry!
October 29, 200817 yr The name you use for your variable makes no difference. The difference is that instead of setting the variable to the current row's ChildID value (thus erasing any previous value), you need to set the variable to itself AND the new value.
October 29, 200817 yr Author So right now I have the condtional formatting saying: not IsEmpty (JOB_Action::ID) and not IsEmpty (FilterValues ($$variable; JOB_Action::ID)) What do I need to change? Sorry I am totally new to this.. I appreciate all your help!
October 29, 200817 yr That conditional formatting looks OK. It's the SCRIPT that SETS $$variable that you need to modify. I imagine that when you click a row, it sets $$variable to JOB_Action::ID. Instead, as Michael said, you need to set $$variable to ( $$variable & ¶ & JOB_Action::ID ). Turn on your debugger and click a portal row. The script in question should appear in the debugger. Click the edit button and proceed from there.
October 29, 200817 yr A few nuances: 1. For the conditional formatting: not IsEmpty ( FilterValues ( $$variable ; JOB_Action::ID ) ) should be quite sufficient. 2. For the script, I'd suggest you start with setting the variable to: $$variable & JOB_Action::ID & ¶ This will add the ID in clicked row to the variable and cause the row to become highlighted. 3. I suppose that once you got that working, the next step would be to make the button toggle the highlighting on/off. This can be done by setting the variable to: Case ( IsEmpty ( FilterValues ( $$variable ; JOB_Action::ID ) ) ; $$variable & JOB_Action::ID & ¶ ; Substitute ( ¶ & $$variable & ¶ ; ¶ & JOB_Action::ID & ¶ ; ¶ ) )
Create an account or sign in to comment