Expand Inline possibility in input parameters on Javascript element
320
Views
8
Comments
New
Service Studio

I would like to have the possibility, as exists for the SQL Advanced Queries, to insert JS code dynamically into a JS logic.

So, the possibility would be to create something like:

Console.$parameter.ExpandInlineAction($parameter.Text)

With $parameter.ExpandInlineAction being 'log' or 'count' to be interpreted as part of the JS code, so we would have the 'Expand Inline' set to true.

And with $parameter.Text being a text like '' or 'show this on console log' as a text, with 'Expand Inline' set to false.

Nice Idea, Would be helpful in many cases!!

Hi,

Why not use the javascript Eval() function for that?

https://www.w3schools.com/jsref/jsref_eval.asp

Regards,

Daniel

Hi Daniel,

Thanks for your comment, I know that eval is a solution, but I would like to have this feature in the platform itself... It seems to be pretty easy to implement and helpful :)

Why? All OutSystems will do is call eval()

I would say it would be easier for all developers to implement it.

Then, I think it would be useful to monitor when a dynamic javascript inline is created or used, for the OutSystems Platform to notify the developers with a warning as it happens on SQL expand inline parameters. Without having that someway hidden.

What do you think?

OutSystems could still generate a TrueChange warning, or ArchDash finding if people use the javascript eval() function. I still fail to see what the build in function that you propose does different or extra than that the eval function does.

I agree with those highlights on TrueChange and on Architecture Dahsboard, Daniel.

It can be seen as a part of this one, or as a whole if no one sees value on this. In my opinion it still makes sense as a whole :)

But thanks once again for you attention to this and your always valid opinions, we disagree on part of this one, for sure we agree on many others!

it would be interesting