Skip to main content
17-Peridot
November 10, 2020
Solved

Expression does not support more than 3 parameters ?

  • November 10, 2020
  • 3 replies
  • 2518 views

Hi, 

It seems that the expression can only accept 3 parameters,  the 4th and consequent parameters are not recognized. 

In the attached screenshot,  console.log(thur) print nothing whatever the base type is STRING or BOOLEAN. 

And the 4th parameter has a strange border . 

seanccc_0-1604984280842.png

 

Best answer by VladimirRosu_116627

I've got the same ThingWorx version (PostgreSQL provider) in a VM, and the image box around the 4th+ item is reproduceable in Firefox as well, looks like an UI issue mostly.

The console.log works fine for those parameters though.

On the boolean side I could not reproduce though. When a Checkbox's state is bound to a boolean type input parameter, the typeof returns boolean - as seen in the console below.

VladimirRosu_0-1605266836916.png

 

3 replies

16-Pearl
November 10, 2020

Hello @seanccc 

 

Yeah it seems as expression is used to evaluate js expressions it might take only 3 parameters. Though there is nowhere it is mentioned so let me collect some more information regarding it and I will get back to you. For your reference you can refer following link

 

http://support.ptc.com/help/thingworx_hc/thingworx_8_hc/en/index.html#page/ThingWorx/Help/Mashup_Builder/Functions/Expression.html

 

Thanks

16-Pearl
November 10, 2020

Hello @seanccc 

 

I tried adding 4 parameters to expression and print the values over console and was able to do so.

 

Might be you are missing something . Can you provide more detail of your use case?

 

Thanks

Om Dukiya

seanccc17-PeridotAuthor
17-Peridot
November 12, 2020

@odukiya ,

I tried again today and yes, console.log  the 4th parameter works, I have no idea why it didn't work.   

 

But it still has some problem for data type "BOOLEAN" ,  the passed value is STRING "true" instead of true for the 4th parameter although set the data type to BOOLEAN.   Set the data type to "STRING" can be a workaround . 

 

Regards,

Sean

16-Pearl
November 12, 2020

Hello @seanccc 

 

I am not sure what I am missing here I tried to have the fourth parameter boolean too and it worked for me. 

Can you please help me with some screenshots may be so that I can get better idea about your use case.

 

Thanks

 

Community Manager
November 30, 2020

Hi @seanccc.

 

If your question has been answered, please mark the appropriate response as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon