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

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

Recommended Posts

Posted

Hello again,

I would like to create a script that allows me to clear just one field that are in the recordsdisplayed through a portal. Is this possible? The script I have only clears the field of the active record in the portal, but not the rest of the records that are displayed.

My scenario: I'm looking at Record/Job #123. I have a portal displaying multiple records of all material that was ordered on Job #123. On each material record there is one field called "amount to bill." I would like the option to clear the contents of this one field when I press a button from my Job table.

Please let me know if further clarification is needed and thank you so much ahead of time for the help!

Posted

Hi

use replace field contents script - make sure this is the only found record though or you will delete more than you had hoped.

Posted

Two methods:

1) Go to the related records, then loop through them and set the field, then return to the original layout (or do it all in a separate window)

2) Create a script that goes to the first portal record and sets the field, then using a loop goes to the next portal row and sets that, and exits after the last portal row. This method has the advantage that the changes to the portal records are not committed until the master record is committed, so it is possible to roll-back all the changes to the related records if there is an error editing one of them.

Posted

I set up method #2 and it works perfectly. I couldn't for the life of me figure it out last night, so thank you so much once again Vaughan! You're a guru!

Posted

I seem to have run into a little roadblock. I have another table within the same file that shows the same portal, but the script doesn't work in this table. I checked my relationships and think everything seems to be in order, but clearly I'm missing something. Any ideas? Thanks again...

Posted

It may be the same relationship, but if it's another portal, then it's a different object (and also the fully qualified field names will be different), so the script won't work.

If you use Vaughan's method no 1 from above, you could write one script which clears the field in the child table in a loop. Then from whatever context you're on, simply go to the proper related records in a new window, call the script, then close the window.

Posted

Haha..well, I just did a cheeky workaround..I made a new script to go to the layout where the original script works, perform the script, and return to the original layout. :laugh2:

  • 3 weeks later...
Posted

Two methods:

1) Go to the related records, then loop through them and set the field, then return to the original layout (or do it all in a separate window)

2) Create a script that goes to the first portal record and sets the field, then using a loop goes to the next portal row and sets that, and exits after the last portal row. This method has the advantage that the changes to the portal records are not committed until the master record is committed, so it is possible to roll-back all the changes to the related records if there is an error editing one of them.

I'm interested in solution #2 since I have to face a similar problem as OP.

What's the best way to make a script go to a portal? "Go to object" using object name? Or directly "go to portal row" (first)? Thanks

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