cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Trouble with Sharepoint List

mwalketx320
Deputy Chef I
Deputy Chef I

Trying to build a recipe to download the list of locations in NetSuite and either add or update a SharePoint list. I've created a task to search the SharePoint list by InternalID (Unique ID / Field from NetSuite). I've created an IF condition task of SharePoint List InternalID equals NetSuite Internal ID - if YES, update SharePoint List Row, if NO Add SharePoint List Row.

I'm starting with a blank SharePoint list. The problem is that the recipe seems to execute the YES task and then executes the NO task. I'm going crazy here! Any help is appreciated.
Screenshot 2025-02-10 205833.jpg

 

 

2 REPLIES 2

Prudvi
Executive Chef I
Executive Chef I

Hi @mwalketx320,
Could you try using the following steps:

1. Scheduled Trigger
2. Search Location In Insuite[BATCH].
3. For Each Item in Step 2 search.
4. Search for item in Sharepoint using the Netsuite ID.(dont use Batch action)
5. In the IF condition check is there any response from the Step 4.
6.If response is Yes, update the sharepoint list and If No response add to sharepoint List

Since you are using Batch action in Sharepoint search, the datapill tree structure might be shown as LIST instead of HASH.
Also in IF condition check the Internal ID from Step 3 and Step 4 instead of Step 2.

Could you please try these and let me know if you are facing any issue.

Regards,
Prudvi

shivakumara
Executive Chef II
Executive Chef II

Hi @mwalketx320 ,

After reviewing your logic, here are my observations:

Issues Identified:

  1. Execution Flow: The recipe currently executes both the "YES" and "NO" tasks sequentially.
    • Reason: Since you're not using IF and ELSE correctly, the execution continues beyond the first condition, leading to unintended behavior.
  2. Flow Control:
    • If you use an IF block followed by an ELSE block, the logic will check the first condition. If it doesnโ€™t match, it moves to ELSE.
    • However, if a LOGGER statement exists after these conditions, it will not execute after the blocks.

Solution:

  1. Use a STOP block immediately after the 6th statement to prevent the execution from reaching the 7th statement.
  2. Implement an  ELSE to ensure only one of the conditions executes, preventing unnecessary processing.

Hope this helps! Let me know if you need further clarification.

Thanks and Regards,
Shivakumara K A