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

  • DPerko Profile Picture
    417 on at
    RE: Trouble using IF statement in Product Configurator model (to return a TEXT value)

    Todd-

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

    Dan

  • DPerko Profile Picture
    417 on at
    RE: Trouble using IF statement in Product Configurator model (to return a TEXT value)

    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

  • atajjo Profile Picture
    509 on at
    RE: Trouble using IF statement in Product Configurator model (to return a TEXT value)

    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.

  • ToddB Profile Picture
    on at
    RE: Trouble using IF statement in Product Configurator model (to return a TEXT value)

    Hi Dan,

    I saw the below in LCS regarding this:

    pastedimage1620418481725v1.png

  • WillWU Profile Picture
    22,352 on at
    RE: Trouble using IF statement in Product Configurator model (to return a TEXT value)

    Moved to SCM forum.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,261 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 233,011 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans