The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

Generate Attributes - function expression for "text exists"

jtfieldsjtfields Member Posts: 3 Contributor I
edited November 2018 in Help

I'm trying to write an expression to determine if data exists in the Industry 1, Industry 2 or Industry 3 attributes.  I wrote the following expression to load a 1, 2 or 3 in a new attribute Number of Industries.  Where I have "TEXT", I need an expression to determine if text data exists...

 

if(INDUSTRY3==TEXT,3,if(INDUSTRY2==TEXT,2,1))

 

I'm a newbie so any help is appreciated.

Answers

  • jtfieldsjtfields Member Posts: 3 Contributor I

    I also tried this but it also didn't work...

     

    if(contains(INDUSTRY3,""),3,if(contains(INDUSTRY2,""),2,1))

  • FBTFBT Member Posts: 106 Unicorn

    Have you tried putting your strings into quotation marks?

  • jtfieldsjtfields Member Posts: 3 Contributor I

    Hi FBT,

     

    Can you provide an example for "putting strings in quotation marks"?  I'm new and not sure how to do this.

     

    Thanks!

    John

  • FBTFBT Member Posts: 106 Unicorn

    Like this from your example above:

     

    if(INDUSTRY3=="TEXT",3,if(INDUSTRY2=="TEXT",2,1))

Sign In or Register to comment.