Message 1 of 6
Not applicable
04-26-2021
09:49 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm trying to clear a large number of fields. What is the proper syntax to create a loop so I don't have to individually type each field ID?
For Example:
item.B1_NOTIFICATION_1 = null;
item.B1_NOTIFICATION_2 = null;
item.B1_NOTIFICATION_3 = null;
item.B2_NOTIFICATION_1 = null;
item.B2_NOTIFICATION_2 = null;
item.B2_NOTIFICATION_3 = null;
I would want to create a loop where I replace the number.
for (var i=1; i<=10; i++){
item.B1_NOTIFICATION_[i] = null;
}
Solved! Go to Solution.