AnsweredAssumed Answered

Picker Not Working

Question asked by NaturSalus on Mar 27, 2012
Latest reply on Mar 30, 2012 by philmodjunk


Picker Not Working



Without any success I have been trying to appply PhilModJunk enhancedvalueselection demo to my project. Certainly, I must be missing something quite obvious that I am not able to spot.




  • Person
  • StorageUnit
  • PersonStorageUnit (join table)





Table Occurrences:

  • StorageUnit TO of StorageUnit table
  • storageUnit_USER TO of PersonStorageUnit table
  • storageUnit_user_PERSON TO of Person
  • Selection_storageUnit_user_PERSON TO of Person




Person table fields:

  • __kp_Person
  • NameFirst
  • NameLAst
  • NameFirstLast
  • PersonRefresh


StorageUnit table fields:

  • __kp_StorageUnit
  • StorageUnitName
  • gSearchField


PersonStorageUnit table fields:

  • __kp_PersonStorageUnit
  • _kf_Person
  • _kf_StorageUnit


StorageUnit::gSearchField  field is a global Text field



Person::PersonRefresh field


Person::Personfresh (text). Auto enter calculation. Select: Do not replace existing value of field (if any).

Evaluate this calculation form the context of: Person

Calculation: Person::PersonRefresh = StorageUnit::gSearchField. Calculation result must be Text. Select: Do not evaluate if all referenced fields are empty.  




storageUnit_user_PERSON::__kp_person =  storageUnit_USER::_kf_Person

Allow creation and delete records on the  storageUnit_USER side


storageUnit_USER::_kf_StorageUnit = StorageUnit::__kp_StorageUnit

 Allow creation and delete records on the storageUnit_USER side


Selection_storageUnit_user_PERSON::PersonRefresh X StorageUnit::gSearchField





StorageUnit_Detail based on the StorageUnit TO

Person_Detail based on the Person TO

PersonOfSU_Selection based on the storageUnit_user_PERSON TO 




On the StorageUnit_Detail layout there is a Portal to the storageUnit_USER TO that has the following fields:




On the StorageUnit_Detail layout there is also the Select button that triggers the LaunchPersonSelection script





On the PersonOfSU_Selection layout  there is a Portal to the Selection_storageUnit_user_PERSON TO that has the following fields:



The filter of the Portal to the Selection_storageUnit_user_PERSON TO is the following:

IsEmpty ( StorageUnit::gSearchField)  or PatternCount (Selection_storageUnit_user_PERSON::NameFirstLast ; StorageUnit::gSearchField )

The two portal fields trigger the PersonOfSU_Selection Portal Script


On the PersonOfSU_Selection layout there is also the StorageUnit::gSearchField that OnObjectModify triggers the Update Search script.


On the PersonOfSU_Selection layout there is also the Cancel button that triggers the Cancel Selection script.



Cancel Selection Script

# Error Handling
Allow User Abort [ Off ]
Set Error Capture [ On ]
Close Window [ Current Window ]
Halt Script


Update Search Script

# Error Handling
Allow User Abort [ Off ]
Set Error Capture [ On ]
Set Field [ StorageUnit::gSearchField; StorageUnit::gSearchField ]



Launch Person Selection Script

# Error Handling
Allow User Abort [ Off ]
Set Error Capture [ On ]
Commit Records/Requests
# Add ParentName
New Window [ Name: "Person Selection"; Height: 400; Width: 600; Top: Get ( WindowTop ) + 132; Left: Get ( WindowLeft ) + 86 ]
Go to Layout [ “PersonOfSU_Selection” (storageUnit_user_PERSON) ]
Show/Hide Status Area
[ Lock; Hide ]
Adjust Window
[ Resize to Fit ]
# script paused so that the user can make his selection
Pause/Resume Script [ Indefinitely ]
End Loop
Exit Script [ ]



PersonOfSU_Selection PortalScript

# Error Handling
Allow User Abort [ Off ]
Set Error Capture [ On ]
Set Variable [ $SelectedPersontID; Value:Selection_storageUnit_user_PERSON::__kp_Person ]
Set Variable [ $StorageUnitID; Value:StorageUnit::__kp_StorageUnit ]
Freeze Window
Go to Layout [ “dev_PersonStorageUnit” (storageUnit_USER) ]
New Record/Request
Set Field [ storageUnit_USER::_kf_Person; $SelectedPersonID ]
Set Field [ storageUnit_USER::_kf_StorageUnit; $StorageUnitID ]
Go to Layout [ “StorageUnit_Detail” (StorageUnit) ]


After creating several Person records and a new StorateUnit record and triggering the Launch Person Selection Script I end up in the PersonOfSU_Selection layout with no Person records on the Portal.


Although I tried to reproduced PhilModJunk enhancedvalueselection demo I did something wrong that I can't spot.

Any clues about how to troubleshoot it?