Jump to content

If function between two custom fields in diesel expression


diskoalnis

Recommended Posts

Hello!

As described in the topic I want to make an if function between two custom fields.

I did a google search on this topic and I assume the diesel expression should be something like this but so far I can't get it to work.

 

$(if,$(eq,$(getenv,CustomDP.Name),Text_1),"New_Text_1",$(if,$(eq,$(getenv,CustomDP.Name),Text_2),"New_Text_2"))

 

What I want to achieve is when the specific field contains specific text in this example "Text_1" the other field should display "New_text_1" and so on.


CustomDP.Name = name of the custom field as displayed in field expression..

 

And thanks to anyone for spending his time on reading this, probably simple question..

Link to comment
Share on other sites

I do not believe the IF expression will work like that in DIESEL. AFAIK it is just a Yes/No deal.

 

Your best bet is to use a LISP as mentioned. 

 

Link to comment
Share on other sites

So long as you use SETENV to give a custom environmental variable a value and do not use dwgprops. you can use a field containing a diesel expression to read that variable

$(getenv,test)

And then in a second field you can use the diesel expression below to compare it

$(if,$(eq,$(getenv,test),string_to_test),yes same,no different)

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...