and more in a single search tool across platforms. Read the announcement here. |
07/28/2022 05:56 AM
Hi Team,
We are using rest connector to import the accounts from end system. There is a condition that if the assignment start date is less than today's date(current date) we need to import few of the attributes from end system.
Is there any way to put the current date condition in Import account JSON?
We have tried by passing '{new Date().format('yyyy-MM-ddThh:mmssZ')}' this variable in import account JSON but it didn't work.
Thanks and Regards,
Lakhitha
07/28/2022 06:23 AM
Can you share JSON ? Is this condition will be in URL / Httpparam or you want to store in Customproperty
07/28/2022 06:25 AM
Condition should be in URL. We are not storing current date to any Customproperty.
07/28/2022 06:50 AM
Attaching the example URL below.
"url"="https://<url>$select=admin_id,adminid_value,start_date,end_date,&$filter=start_date lt CurrentDate and end_date gt CurrentDate
This URL we are adding it in the account import call under http section
07/28/2022 08:23 PM
You can try below
"https://abc.com/persons?person-group=contractor&effective-date>=${(new Date()).format('yyyy-MM-dd%20hh:mm:ss')}"
${(new Date()).format('yyyy-MM-dd')}
07/29/2022 12:00 AM
Hi Rushikesh,
Thanks for your response.
I have tried the above date format and getting the same error when we run the account import job.
Error - Null Response from Target and failed URL.
Thanks & Regards,
Lakhitha
07/29/2022 07:10 AM - edited 07/29/2022 02:33 PM
Hello @Lakhitha,
Here's a link to the forum post which has a similar discussion. It has been suggested to create an attribute in the connection json to compute the date and then call that and use it in the import process.
Ive not tried this but see if this helps.