cancel
Showing results for 
Search instead for 
Did you mean: 

VC 7.1.1 - Excel Simulated Service and Drop Down

Former Member
0 Kudos

Hello,

I have created the Simulated Service using Excel - data being Km (0 to 300), when using the drop down, the number is not converted to text, on RT, the display should be 1 instead it is 1.0.....

any pointers?

Thanks much,

Dharmi

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

I solved it using replace statement

Former Member
0 Kudos

Hi Dharmi,

I can suggest 2 ways to do that:

1. Rebuild your service, only this time make sure that the excel cells (that hold the km in your case) are formatted as TEXT. you can use this screenshot to clear it out: http://www.box.net/shared/nqh7dyvx44

Then when you paste it in the service component wizard it will automatically be translated to String type.

2. If you do not want to rebuild your service, do the following:

open the service component

add a text field on the out port

map the numeric field to the text field on the line connected to the signal out

outside of the service component, use the text field instead of the numeric one.

I believe that the convertion is created automatically, else you can use the dynamic expression editor with the NSTR(number) function.

In you model you can always convert numbers to text and vise versa using NSTR() and NVAL()

I hope that will solve your issue

Regards

Yogev

Former Member
0 Kudos

Hi Yogev,

Thank you for your response. I did do both the steps you mentioned, but the result was same "1.0" , so I used a replace statement to solve it.

Best regards,

Dharmi