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

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

Recommended Posts

Posted

Hello,

I am trying to filter a portal that shows on a pop up window, but I haven't manage to do it. Maybe somebody can suggest some directions.

In my project I am using a very long value list not suitable to a reduction using a conditional value list. Not suitable because there are no criteria that I could used in the conditional value list.

So I decided to mimic the value list in portal on a pop up window.

My purpose is adding to each Child record the ParentName of its related Parent record.

The standard way of doing it is using either a Drop down list or a Pop Up menu with settings:

  • Use values form first field: PARENT::__kp_Parent
  • Also display values from second field: PARENT::ParentName

However, the list of ParentNames is very large and cannot be reduced by a Conditional Value List. Therefore I need a way to show that lengthy list of ParentNames in a Portal on a popup window and from here select the ParentName that I want to relate to the current Child record.

Tables:

  • Parent
  • Child

Parent table fields:

  • __kp_Parent
  • Parent Name
  • gFindParent

Child table fields:

  • __kp_Child
  • _kf_Parent
  • Child Name
  • ParentName

Table Occurrences:

  • PARENT
  • AllPARENT
  • CHILD

Relationships:

  • PARENT::__kp_Parent = CHILD::_kf_Parent
  • PARENT::__kp_Parent X AllPARENT::__kp_Parent

From the Child layout, based on the CHILD table occurence, the Select button (Current script: Pause) triggers the Lauch Parent Selection script.

When the Lauch Parent Selection script is triggered the user ends up in the ParentSelection layout based on the PARENT table occurrence. In this layout there is a portal to the AllPARENT table occurrence with two fields: AllPARENT::__kp_Parent and AllPAREN::ParentName. The two fields on the first row of the portal are grouped and together trigger the Portal Script used to select the Parent record that will be related to the Child record from which the Lauch Parent Selection script was triggered. On top the Portal there is the Cancel button (Current script: Pause) that triggers the Cancel script.

No problem showing the Parent records on the Portal.

The problem appears when I try to filter teh records shown on the portal.

I tried, by failed:

I have put the Parent::gFindParent field above the Portal on the ParentSelection layout based on the PARENT table occurrence. OnMobjectModify the Parent::gFindPArent field triggers the Parent Find script.

Parent Find Script:

# Error Handling

Allow User Abort [ Off ]

Set Error Capture [ On ]

#

If [ not IsEmpty ( PARENT::gFindParent ) ]

Enter Find Mode [ ]

Set Field [ AllPARENT::ParentName; PARENT::gFindParent ]

Perform Find [ ]

Else

Show All Records

Sort Records [ Specified Sort Order: ascending ] [ Restore; No dialog ]

End If

Go to Field [ PARENT::gFindParent ]

Any comments about how to make the portal filter work are wellcome.

Thanks,

natursalus

Posted

Try using list view in your pop-up window instead of a portal. Then you can perform a find, or a GTRR to get the correct found set instead of having to filter a portal.

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