Web Portal: Is there a way to execute backend functions or scripts?

Hello people,

I was wondering if there is a way to execute backend functions from the Web Portal.

For Example: let's say I have a function in backend called "CCC_MyFunction" which accepts some parameters and returns some string. Is there a way to retrieve that resulting string in the Web Designer? I would like to avoid rebuilding the same function in the backend and in the frontend.

Thanks in advance for you help!

Cheers,

Ryu

Parents Reply Children
  • Hi Hanno,

    thank you very much for the link! I will try it out!

  • Hi Hanno,

    So I understand that one can call "CCC_MyFunction" from Web Designer. Also that this call may be programmed in C#.

    However, what I don't know is which component I need in which place to retrieve the result. For Example: I would like my function to executed when the user uses my component. Therefore, my first intuition would be create a single row collection and have that collection be filled by the initialiser. But where would I put "CCC_MyFunction(<some parameter>)"? Defining that in the collection doesn't seem to do the trick and I'm not sure where to define that in the "Load Collection" component.

    I would be very greatful if you could provide a screen shot of the example.

    Thank you very much in advance.

    Cheers,

    Ryu

  • Hi Ryu,

    you should be able to call CCC_MyFunction just as if it was a function defined within your component.

    In your example, if you want to store the return value in a single row collection, you should use an Update Action rather than Load to update the field of your single row collection (you do not actually load the single row, it is already there from scratch).

    You then can simply call your script in the value property of your update action, e.g. CCC_MyFunction("somestringparameter").

    However, the type of the return value might be restricted to what you can set as "Data Type" when you define a function within a component or module.

    Regards,

    Dennis