- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2025 04:59 AM
I have created a OnBefore transform script to perform a task, script in initiating but particular block of code is not working. Earlier i tried with includes to match string from my glide record. Later i even tried with indexOf also with TRIM
Here is my current code
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2025 11:27 AM
Hi @Suresh Kathavar ,
Use below script :
var searchTerm = 'Marked for deletion';
var description = (source.u_description || '').toString().trim();
if (description.indexOf(searchTerm.trim()) > -1) {
gs.log("Matched string found. Setting delete status to In Progress");
target.u_ad_delete_status = 'In Progress';
}
If my response helped, please hit the 👍Thumb Icon and accept the solution so that it benefits future readers.
Regards,
Pratik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-09-2025 11:27 AM
Hi @Suresh Kathavar ,
Use below script :
var searchTerm = 'Marked for deletion';
var description = (source.u_description || '').toString().trim();
if (description.indexOf(searchTerm.trim()) > -1) {
gs.log("Matched string found. Setting delete status to In Progress");
target.u_ad_delete_status = 'In Progress';
}
If my response helped, please hit the 👍Thumb Icon and accept the solution so that it benefits future readers.
Regards,
Pratik