#dominoforever | Product Ideas Portal

Welcome to the #dominoforever Product Ideas Forum! The place where you can submit product ideas and enhancement request. We encourage you to participate by voting on, commenting on, and creating new ideas. All new ideas will be evaluated by HCL Product Management & Engineering teams, and the next steps will be communicated. While not all submitted ideas will be executed upon, community feedback will play a key role in influencing which ideas are and when they will be implemented.

For more information and upcoming events around #dominoforever, please visit our Destination Domino Page

Add a ternary operator to LotusScript

Would allow for somewhat cleaner code.

  • Guest
  • Apr 22 2020
  • Needs Clarification
  • Attach files
  • Guest commented
    27 Apr, 2020 03:50am

    Assuming the second comment on 23 April 12:28 is the correct example of ternary operator then there are a few benefit :

    • Less line of code, even if this is something that would hardly matter anymore

    • More similar to other more recent programming language, hence it would lessen the learning curve.

    • There are still some areas (like Notes Client development) that you are forced to use Lotuscript / Formula so they to need to be "modernized"

    Please feel free to add if anyone have other benefit.

    Tinus Riyanto - Prisma Global Solusi

  • Guest commented
    23 Apr, 2020 12:32pm

    I should note, some languages use a slightly different syntax or use an intrinsic function, but since C/C++, Java, and JavaScript all use the condition ? value-if-true : value-if-false syntax, that would probably be best to adopt.

  • Guest commented
    23 Apr, 2020 12:28pm

    Let me give it a shot. A ternary operator comes in the form

    condition ? value-if-true : value-if-false

    and is used frequently in assignment, and sometimes nested, such as:

    warningZone = (heat > 100 ? "Red" : (heat > 80 ? "Yellow" : "Green));

    This concisely replaces extended if-else such as

    if (heat > 100)
    warningZone = "Red";
    else if (heat > 80)
    warningZone = "Yellow"
    warningZone = "Green"
    end if

    It is also immensely useful in logging or other statements where the ternary operator can be used in-line.

  • Admin
    Thomas Hampel commented
    23 Apr, 2020 11:36am

    Can you please describe this idea in more details so that anybody can understand what you mean?

    e.g. what is the current situation, what is your proposal and how would it improve the product?