Hi,
I would like to know where the js functions present in expression editor in workflows are defined. Need to look into some OOTB functions.
I could find some sql functions in Admin->Config->SQL that corresponds to the js functions, but couldn't locate the js function definition.
Any help/hint is appreciated.
Thanks,
Deb
Solved! Go to Solution.
Views
Replies
Total Likes
File path : <Campaign_Installed_location>\datakit\xtk\eng
File Name: funcList.xml
- Malarrajan Sundarraj
By any chance you know the js file name?
I had no luck finding the one.
Thanks,
Deb
Views
Replies
Total Likes
Hi Dev,
which OOB function you are looking for ? Functions definitions are present in database specific files .
For example all postgres related functions are defined inside xtk:postgresql-functions.sql
I am looking for definition of WeekDay() function.
I couldn't locate that in xtk:postgresql-functions.sql.
Cheers,
Deb
Views
Replies
Total Likes
Hi Dev,
Let me check on this function definition code .
Please find below how weekday works:
WeekDay(date/datetime)
Returns the number of day in the week following the rule: 0=Monday ...
6=Sunday.
In case argument is of type datetime - day of the week is calculated from time in client's timezone (timezone is passed to server in query). Otherwise, if argument is of type date, day of the week is calculated in timezone agnostic manner.
Example
WeekDay(#2021-09-22 00:34:56Z#)=2
Views
Replies
Total Likes
Thanks @ShrawanSaxena for your hep.
But did you get this function definition any where in Adobe Campaign, like in any JS or SQL?
Cheers,
Deb
Views
Replies
Total Likes
Hi @Deb_Tripathy ,
The fucntion defination in the back end file. It wont be available in the Client console.
For PostgreSQL:
mod(cast(Extract(dow FROM $tz1) as integer)+6, 7) // $tz1 -> Data with timestamp
- Malarrajan Sundarraj
Thanks @Malarrajan_Sundarraj .
At least, It is clear that cant be accessed from console.
May I know the server file name and location?
Cheers,
Deb
Views
Replies
Total Likes
File path : <Campaign_Installed_location>\datakit\xtk\eng
File Name: funcList.xml
- Malarrajan Sundarraj
It's impossible: expressions from workflows (and that appears in the nlClient UI) are only pure SQL translation expressions... You will never find any JS dedicated expression in it:
low level expression are ran directly on the DB layer. higher level expression (from JSAPI) are ran on the JS engine layer (on top of the DB layer)
If you need to add new SQL expression, you can use this documentation:
Ajout d'autres fonctions SQL | Adobe Campaign
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies