Discussions
Join us for complimentary one-day events around the world and step into a future fueled by AI and limitless potential. Explore new breakthroughs, sharpen your skills, and connect with experts who are shaping what’s next. Experience bold keynotes, interactive learning, and connections that span the global NetSuite community. Discover what's next at SuiteConnect Tour 2026.
How to take value of variable out of a 'for' loop
Hi everyone,
I'm trying to figure out how to take a value of a variable outside of a 'for' loop when it's declared inside of the loop. I know this could be easily done by doing everything inside the curlies as the value of a variable does not exist outside of it, but it can't be avoided when trying to get a joined record field in a transaction column, thus, a nested loop.
Say for example you have a transaction record, with a list/record column field 'joinedrecord_name' where a joined record is selected (id shows in the field). Then, you have another column textfield in the transaction column called "joinedrecord_text" where I want to populate the value from one of joinedrecord_name's item list field. Let's call this field "text_field_in_joined_record".