Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Expression Problem: single & double Number

Explorer ,
Feb 09, 2017 Feb 09, 2017

Good evening guys!

Can someone tell me about this problem?

Problem.jpg

The logic is when I write the number automatically display first the Surname and after the Νame. When I check the Checkbox Control, display reverse fisrt the Name and then the Surname.

When the numbers are double (10, 20, 30) all is ok!

When the number is single (1,2,3,4), the algorithmn in the number 1 works ok.

when I write 2, shows the number 1 with the name and surname reverse!!! 

And from there on, the algorithm is one step back with the Surname and the Name reverse.

I write 3, shows the 2 reverse

I write 4 displays 3 reverse...

Thanks you all

John K.

I have this expression:

A = parseInt(text.sourceText);

a1 = parseInt(comp("2.2 Team 2 Data").layer("No 1").text.sourceText);

a2 = parseInt(comp("2.2 Team 2 Data").layer("No 2").text.sourceText);

a3 = parseInt(comp("2.2 Team 2 Data").layer("No 3").text.sourceText);

a4 = parseInt(comp("2.2 Team 2 Data").layer("No 4").text.sourceText);

if(A==a1 + (comp("1.2 Team 1 Data").layer("Name Controller").effect("Change Name <> Surname")("Checkbox")==0)) comp("2.2 Team 2 Data").layer("No 1").text.sourceText + "  " + comp("2.2 Team 2 Data").layer("Player 1 Surname").text.sourceText + "  " + comp("2.2 Team 2 Data").layer("Player 1 Name").text.sourceText;

else if(A==a1 + (comp("1.2 Team 1 Data").layer("Name Controller").effect("Change Name <> Surname")("Checkbox")==1)) comp("2.2 Team 2 Data").layer("No 1").text.sourceText + "  " + comp("2.2 Team 2 Data").layer("Player 1 Name").text.sourceText + "  " + comp("2.2 Team 2 Data").layer("Player 1 Surname").text.sourceText;

else if(A==a2 + (comp("1.2 Team 1 Data").layer("Name Controller").effect("Change Name <> Surname")("Checkbox")==0)) comp("2.2 Team 2 Data").layer("No 2").text.sourceText + "  " + comp("2.2 Team 2 Data").layer("Player 2 Surname").text.sourceText + "  " + comp("2.2 Team 2 Data").layer("Player 2 Name").text.sourceText;

else if(A==a2 + (comp("1.2 Team 1 Data").layer("Name Controller").effect("Change Name <> Surname")("Checkbox")==1)) comp("2.2 Team 2 Data").layer("No 2").text.sourceText + "  " + comp("2.2 Team 2 Data").layer("Player 2 Name").text.sourceText + "  " + comp("2.2 Team 2 Data").layer("Player 2 Surname").text.sourceText;

else if(A==a3 + (comp("1.2 Team 1 Data").layer("Name Controller").effect("Change Name <> Surname")("Checkbox")==0)) comp("2.2 Team 2 Data").layer("No 3").text.sourceText + "  " + comp("2.2 Team 2 Data").layer("Player 3 Surname").text.sourceText + "  " + comp("2.2 Team 2 Data").layer("Player 3 Name").text.sourceText;

else if(A==a3 + (comp("1.2 Team 1 Data").layer("Name Controller").effect("Change Name <> Surname")("Checkbox")==1)) comp("2.2 Team 2 Data").layer("No 3").text.sourceText + "  " + comp("2.2 Team 2 Data").layer("Player 3 Name").text.sourceText + "  " + comp("2.2 Team 2 Data").layer("Player 3 Surname").text.sourceText;

else if(A==a4 + (comp("1.2 Team 1 Data").layer("Name Controller").effect("Change Name <> Surname")("Checkbox")==0)) comp("2.2 Team 2 Data").layer("No 4").text.sourceText + "  " + comp("2.2 Team 2 Data").layer("Player 4 Surname").text.sourceText + "  " + comp("2.2 Team 2 Data").layer("Player 4 Name").text.sourceText;

else if(A==a4 + (comp("1.2 Team 1 Data").layer("Name Controller").effect("Change Name <> Surname")("Checkbox")==1)) comp("2.2 Team 2 Data").layer("No 4").text.sourceText + "  " + comp("2.2 Team 2 Data").layer("Player 4 Name").text.sourceText + "  " + comp("2.2 Team 2 Data").layer("Player 4 Surname").text.sourceText;

else text.sourceText

222
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 09, 2017 Feb 09, 2017
LATEST

This looks like a scripting problem rather than expressions. I suggest you ask in the proper subspace when you have these kinds of questions. You are more likely to run into folks that specialize in coding. Subspaces

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines