Jump to content
Salesforce and other SMB Solutions are coming soon. ×

Filtering Portal Rows - Confused


iankh
 Share

Recommended Posts

I know there was another thread on this, which I read completely but am totally confused.

 

I have a layout that has a portal. The records in the portal have radio buttons for "yes", "no" and of course the third possiblity is null (neither yes or null).

 

What I'm trying to do is create buttons that allow the user to filter the listed records in the portal to show only the "yes" or the "no" or show all.

 

I don't seem to be able to get this to work, and something tells me it should be relatively simple. I've tried scripting using perform find, with no luck.

 

Any advice would be most appreciated. Thanks.

Link to comment
Share on other sites

Thanks, that really helped, but when I have a match field, nulls are still showing up. So if it is matching on "yes" I am getting both 'yes" records and null (neither yes or no selected) How do I constrict the relationship to only display what is selected?

Link to comment
Share on other sites

"null" is an actual value? Or do you have an item in the value list that's actually blank? If it's actually blank, you need a different field to use for maching purposes, one that equates to "Yes" if it's "Yes", "No" if it's "No", and "Null" or "None" or something like that if it's blank/empty.

Link to comment
Share on other sites

"null" is an actual value? Or do you have an item in the value list that's actually blank? If it's actually blank, you need a different field to use for maching purposes, one that equates to "Yes" if it's "Yes", "No" if it's "No", and "Null" or "None" or something like that if it's blank/empty.

 

The field in the portal records has radio buttons "yes" and "no" I was assuming that if neither were selected it would be null or blank. I would like the user to be able to filter the list to show only the "yes" portal records, only the "no" portal records, only the records without either yes or no (blank) or all the records.

Link to comment
Share on other sites

In my instructions on the other thread (referenced above) I wrote:

 

Time to define some new fields.

 

In TermClass, Matchfield, which is a text calc field, =

 

Person ID & "¶" &

Person ID&"|"&Term&"¶" &

Person ID &"|"&InstructorName

 

The result, if you viewed a specific record in browse mode, would look something like:

 

80125

80125|Fall06

80125|Jones, Cynthia

 

What you want is constructed slightly different — if you never want to see all the values regardless of radiobutton-value, your matchfield on the portal side of the relationship would be ID Field&"|"&RadioButtonValue (no returns, it's not a multikey).

 

That means when the radio button is "Yes" your matchfield value is "80125|Yes"; when it's "No", "80125|No"; and when it's blank, "80125|".

 

On the localtable side of the relationship, your matchfield would be ID Field&"|"&GlobalRadioButtonField.

 

Now, if you do sometimes want to see all the related values in the portal regardless of radiobutton-value, that's when you need a multikey matchfield.

Link to comment
Share on other sites

So, let me see if I understand. I can filter for "yes", "no" and blank by using a match on a concatenation of the key field and the radio button field? Right?

 

How would I get the "show all" 4th case to work. I've tried the multi-match but that returns "yes" (or "no") and blanks?

Link to comment
Share on other sites

If you do want the option of "Show All", change your field def for the Matchfield in the portal-side of the relationship to:

 

ID Field&"¶"&

ID Field&"|"&RadioButtonValue

 

It's now a multikey, so it will reconcile to a string like:

 

80125

80125|Yes

 

when RadioButtonValue is "Yes". The bottom line would change depending on the value of RadioButtonValue but the top line will remain the same throughout.

 

On the localtable side of the relationship, your value list for GlobalRadioButtonList needs to be changed to include "Show All", and the matchfield needs to be changed to:

 

Case((GlobalRadioButtonField="Show All"), ID Field, ID Field& "|"& GlobalRadioButtonField)

 

Since "80125|" is not the same string as "80125", that arrangement distinguishes between Show All and "null".

Link to comment
Share on other sites

 Share



×
×
  • Create New...

Important Information

Terms of Use