Skip to main content
March 28, 2022
Question

How to execute MySQL stored function

  • March 28, 2022
  • 3 replies
  • 0 views

Hi,

After reading the Appian document, I did not see any way to call a stored function (stored procedures only are callable).

Can you confirm me this fact please ?

(If I can't call such a function, I will use a stored procedure with OUT params as a workaround)

Regards

3 replies

viraty527193
March 28, 2022

Hi [mention:1bef179229004ddc96b85765d77cfdc1:e9ed411860ed4f2ba0265705b8793d05]

As far as my knowledge of Appian is concerned I have not come across any scenario where Database functions need to be used on Appian, as functions can be created on Appian through expression rules which are equivalent to what you want to achieve through database stored functions, hence there might not be something to cater the execute database stored function use case.

I believe the database stored function's behavior can be replicated in Appian expression rules and combined with query entities you can achieve desired results.

But still, if you want to use database stored functions you can go with what you have already suggested as a workaround.

Also below are a few links that you might find useful.

https://docs.appian.com/suite/help/22.1/fnc_system_a_executestoredprocedureforquery.html

https://docs.appian.com/suite/help/22.1/Execute_Stored_Procedure_Smart_Service.html#a!executestoredprocedureonsave()

Hope it helps

March 28, 2022

Thank you Virat for your reply and links,

Of course, the stored function I need would not be a simple SELECT (or Query Entity), because in this case I would have used a simple ER.

(the function I need calls some UPDATE commands)

In this case, I will use a stored procedure. It is not a problem. 

viraty527193
March 28, 2022

Using the stored procedure seems to be the best option in this case