Custom Functions in schema expression. | Community
Skip to main content
nitesha38268385
Level 2
September 16, 2020
Solved

Custom Functions in schema expression.

  • September 16, 2020
  • 3 replies
  • 2196 views

Hi Folks,

 

Can you please help in, how to implement custom JS functions which can be used in the expr of the data schema attribute.

Something similar to the below-mentioned expression.

expr="AESEncrypt(@id)"

Want to use the custom created functions rather than the AESEncrypt.

 

Any help or suggestion in this regard will be highly appreciated.

 

Thanks, 

Nitesh

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by DavidKangni

Hi Nitesh,

 

You can create method in your schema and define a function or javascript for this method.

        <methods>                 //definition of SOAP methods
            <method>
                ...
            </method>
            ...
    </methods>  

Thanks,

David

3 replies

DavidKangni
Community Advisor
DavidKangniCommunity AdvisorAccepted solution
Community Advisor
September 16, 2020

Hi Nitesh,

 

You can create method in your schema and define a function or javascript for this method.

        <methods>                 //definition of SOAP methods
            <method>
                ...
            </method>
            ...
    </methods>  

Thanks,

David

David Kangni
Sukrity_Wadhwa
Community Manager
Community Manager
September 24, 2020

Hi @nitesha38268385 ,

Were you able to resolve this query with the given solution? Do let us know.

Thanks!

Sukrity Wadhwa
Heku_
Level 5
June 16, 2023

I think you can't, in that "expr=" you can use database functions that you can find in the advanced expression editor of the query activities: 

As an example, you can encrypt the @1716897 with sha512 using expr="Sha512Digest(@id)"