web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Unanswered

Trouble using IF statement in Product Configurator model (to return a TEXT value)

(0) ShareShare
ReportReport
Posted on by 417

I have written a product configurator model containing subcomponent. I am now trying to write a calculation (if statement) the will return a text value attribute for the subcomponent. What syntax should be used to perform this function? It seems like the if statement is only working to return numeric values.

Here is the example I am trying to solve for: If a user selects either "TB" or "TO" return "TB". If any other selections are made return "00".

I would have assumed if[CCTBO2 == "TB" | CCTBO2 == "TO", "TB", "00"] would have worked but it appears returning text values is where my problem is. (Changing the values returned to integers gets rid of the error.

What is the correct syntax to return text values from an if statement? Any help would be appreciated.

Thanks

Dan

I have the same question (0)
  • WillWU Profile Picture
    22,361 on at

    Moved to SCM forum.

  • ToddB Profile Picture
    on at

    Hi Dan,

    I saw the below in LCS regarding this:

    pastedimage1620418481725v1.png

  • atajjo Profile Picture
    509 on at

    I stumbled upon this issue recently and I can confirm the solution above my post is correct.

    Basically instead of returning "TB" you have to return the row number that corresponds to this value in the fixed list (1st row number is 0).

    OP please confirm whether this solves your issue.

  • DPerko Profile Picture
    417 on at

    Thanks for the reply. I ended up opening a ticket with MBS to get the answer. Definitely frustrating that some of these things aren't documented.

    Dan

  • DPerko Profile Picture
    417 on at

    Todd-

    Thanks for the answer. Would be nice if this type of information was documented.

    Dan

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Laurens vd Tang Profile Picture

Laurens vd Tang 299 Super User 2025 Season 2

#2
Siv Sagar Profile Picture

Siv Sagar 183 Super User 2025 Season 2

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 118 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans