Show or hide field depending on the content of another field/relation

We only want to display the custom field "latest_delivery_date" in the revenue line items if the product linked in the revenue line item is of the product type "Camera Systems".  In Studio, I can mark the field as dependent and then enter a formula. The syntax "is $product_type("Camera Systems")" does not work because there is probably no "is" function.




Where is the syntax incorrect?
How can I meet this requirement? Any suggestions or ideas are very welcome.

Thanks,
Steffen



Parents
  • Hi  ,

    For field visibility formulas, you need to use one of the formulas that returns a boolean (true/false) response. Those formulas are indicated by the icon with the empty and filled circles. The two best options based on your use case are equal() or isInList(). My personal preference is to always use isInList() since it allows for easier maintenance moving forward should your use case expand to other product types. To use equal, your formula would look like:

    equal(
        $product_type,
        "Camera Systems"
    )

    The isInList formula provides you a format where you can easily add additional qualifications at a later time. The formula would look like this to start:

    isInList(
        $product_type,
        createList(
            "Camera Systems"
        )
    )

    If you had another product type to add for the visibility dependency, you would add the value in the createList formula.

    Chris

Reply
  • Hi  ,

    For field visibility formulas, you need to use one of the formulas that returns a boolean (true/false) response. Those formulas are indicated by the icon with the empty and filled circles. The two best options based on your use case are equal() or isInList(). My personal preference is to always use isInList() since it allows for easier maintenance moving forward should your use case expand to other product types. To use equal, your formula would look like:

    equal(
        $product_type,
        "Camera Systems"
    )

    The isInList formula provides you a format where you can easily add additional qualifications at a later time. The formula would look like this to start:

    isInList(
        $product_type,
        createList(
            "Camera Systems"
        )
    )

    If you had another product type to add for the visibility dependency, you would add the value in the createList formula.

    Chris

Children