Discussions

Expand all | Collapse all

Custom Data Rul

  • 1.  Custom Data Rul

    Posted 09-23-2020 04:14
    Hi,

    I have a Facilities Table with a one-many relationship with a Rooms Table.

    The Rooms Table has the following fields;

    Related Facility (Numeric) which is related to the Facilities Table.
    Facility Name (Text) which is a Lookup Proxy.
    Room No. (Numeric).
    Facility_Room No Validation (Formula Numeric).

    Facility_Room No Validation has the formula ToNumber([Related Facility]&[Room No.])

    If Related Facility is 1 and Room No 333 it returns a value of 1333, as per below.
    The Custom Data Rule is

    If([Related Facility]+[Room No.]=[Facility_Room No Validation],"This Room No. already exists for this Facility. Enter new Room No.")

    However it is not working. Any suggestions would be appreciated.

    Thanks


    ------------------------------
    Tim Egerton
    ------------------------------


  • 2.  RE: Custom Data Rul

    Posted 09-23-2020 07:16
    I think that you may be using the wrong technique care. I suggest that you simply mark the field 

    [Facility_Room No Validation]

    in field properties as being Unique.

    However since there is no concept in your formula of which day the room is being booked for it seems to me that your formula needs to be expanded to deal with the same facility in the same room in the same day


    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 3.  RE: Custom Data Rul

    Posted 09-24-2020 03:30
    Hi Mark,

    Thank you that worked well.

    ------------------------------
    Tim Egerton
    ------------------------------