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

Drop down field in a portal not going to correct related record


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

Recommended Posts

Posted

Hi all, I hope you can help.

 

I have a drop down field in a portal with a value list attached, the value list is a number of different written functions, for example "Set Priority", "Set Normal" , "Delete"... there is a script trigger set to 'OnObjectModify'.

 

The idea is rather than have many different buttons in the portal for these different functions I want the user to select a function from a drop down, and based on their choice, the script trigger carries out the requested task.

 

But everytime I request a task from the dropdown, it always goes to the first record in the portal, despite the 'Go to Related Record, Match Current Record only' setting being turned on.

 

Below image link shows my script trigger on the portal dropdown... so you can see the first If statement checks to see if the field 'action_select' (the drop down field) is set to "Set Primary"if so it sets another field in the same table to a 'Yes' value and resets the dropdown field to "Action >" but this is'nt happening as it doesn't go to the correct record.

 

The flush Cache and refresh window steps are to ensure the portal refeshes properly when we come back to the original layout, so you can see the changes.

 

script.png

 

 

 

Posted

Add an extra step or two. On filed entry, collect the portal row number to a global field. Then on the on exit field, add go to portal row where it is the value of that global field. Alternately use a variable instead of storing the portal row in a global. That should keep your portal from losing focus. I generally have a script go to a field to make sure I am in the right portal, then go to a portal row, then do something.

Hth

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