Skip to Main Content
Need Support? Let’s guide you to the right answer or agent.
Status Future consideration
Workspace SYNCHRO 4D Pro
Created by Alexandru Buzan
Created on Nov 29, 2021

Use of wild cards within Script

Hi,

Would it be possible to implement wild cards within SYNCHRO Script?

Example: I have the following User Fields: ABCD, ABED, ABBN, ABLM, ABHJ, ABDH, etc. I would like to sum all their values with something like SUM UFV("*AB*"). This would be very helpful for the AWP workflow where we use Modeler to generate man hours user fields for resources and then we need to calculate them per task.

Best regards,

Alex Buzan

Senior Consultant, Construction

Bentley Systems

  • Indrawan Wijaya
    Reply
    |
    Feb 11, 2022

    I like if we have the Wild Card, like ? or *

    Example If we want to have AB in Third possition. we can use:

    UFV("WP") LIKE "?AB*"


  • Admin
    Jacqueline Chen
    Reply
    |
    Feb 10, 2022

    Would > or >= help already?


    > (BOOL) Greater than.

    Text: Returns TRUE if the first string should come after the second when sorting in ASCII character set order (Case-senstive)

    10 > PI -> TRUE

    "b" > "a" -> TRUE

    <= (BOOL) Less than or equals.

    Text: returns TRUE if the first string is contained inside of second (Case-senstive)

    "app" <= "apple" -> TRUE

    >= (BOOL) Greater than or equals.

    Text: returns TRUE if the second string is contained inside of first (Case-senstive)

    "Happy" >= "app" -> TRUE

    <> (BOOL) Text: Returns TRUE if either string is contained inside of the other (Case-senstive)

    "ana" <> "banana" -> TRUE


  • Admin
    Jacqueline Chen
    Reply
    |
    Feb 10, 2022

    Alex - out of curiosity, would there be a case where the UFVs don't start with AB but are in the middle? Such as DABE, CABD, etc.