Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Highlighting mulitple rows in a protal with Conditional Formatting

Featured Replies

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

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

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

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.

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

2985094148

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

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.

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

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.

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

)

  • Author

YOU ARE A GENIUS! Thank you for all your help!

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.