Abort the scheduled data import through Pre-script script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2023 06:52 AM
I need to abort the scheduled data import from Excel, based on checking headers of imported Excel sheet.
From Below script I'm able to get the headers name in system logs but cannot find a funtion which I can call inside the if(header1 != 'Allocation Logic') to abort the import submission.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2023 11:58 AM
Well, that's not the condition you used in your original post. There you said
if(header1 != 'Allocation Logic') {...}
Did the import run? Add a return statement, and another log statement after the if-block. Then try again, and check whether the import ran or not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2023 09:59 AM
Can you simply write a
return false;
This will prevent further execution of the script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2023 09:16 AM
Hi @ankit19,
Instead of pre-import scripts, have you tried in conditional scripts?
Thanks,
Sagar Pagar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2023 09:25 AM
Thanks for your response.
I have tried the same in Conditional Script, but didnt worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2023 09:31 AM
