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

Highlighting mulitple rows in a protal with Conditional Formatting


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

Recommended Posts

Posted

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!

  • Newbies
Posted

describe the situation. Is your portal making reference to the right table ? it sounds you have not define the common fields correctly.

Posted

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?

Posted

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.

Posted

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:

2985094148

Maybe the past post answers this, but I am not getting it. Sorry!

Posted

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.

Posted

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!

Posted

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.

Posted

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 & ¶ ; ¶ )

)

This topic is 5867 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.