cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Expression does not support more than 3 parameters ?

seanccc
17-Peridot

Expression does not support more than 3 parameters ?

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

 

1 ACCEPTED SOLUTION

Accepted Solutions

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

 

View solution in original post

8 REPLIES 8
odukiya
15-Moonstone
(To:seanccc)

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

odukiya
15-Moonstone
(To:seanccc)

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

seanccc
17-Peridot
(To:odukiya)

@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

odukiya
15-Moonstone
(To:seanccc)

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

 

I remember there was a bug in this area, but I am not 100% sure.

 

Note: I suggest writing the specific ThingWorx version you're using (including the persistence provider) and the browser you use in these community posts, like in the Tech Support tickets. Otherwise due to version mismatch the communication will not be optimal.

@VladimirRosu ,

 

ThingWorx Version: 8.5.5

Browser: Chrome 86.0.4240.75

 

Regards,

Sean

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

 

slangley
23-Emerald II
(To:seanccc)

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

Top Tags