{ "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://ramp-schemas-int.datacollection.qa.finra.org/forms/u4/models/0.0.1/firmAssociationOfficeLocations.json", "title": "Office of Employment Address", "type": "object", "additionalProperties": false, "required": [ "employmentLocationStartDate", "isRegisteredLocation" ], "properties": { "id": { "$ref": "https://ramp-schemas-int.datacollection.qa.finra.org/forms/u4/models/0.0.1/decaf-common-definitions.json#/definitions/decafId" }, "employmentLocationAssociationIdentifier": { "type": "integer", "$comment": "Unique APP ID" }, "branchCrdNumber": { "title": "CRD Branch #", "type": "integer", "minimum": 1, "maximum": 9999999999, "messages": [ { "messageKey": "ifLocationIsRegisteredThenBranchCrdNumberRequired", "messageText": "If Employment Location is registered then 'CRD Branch #' is required." }, { "messageKey": "isValidBranchFirmCombination", "messageText": "The office of employment address being added is not associated to the firm filing this form. Select another office of employment location." }, { "messageKey": "isActiveBranch", "messageText": "The Registered Branch Office of Employment Address being added is no longer an active branch office. Select another Office of Employment location." } ] }, "branchFirmBillingCode": { "title": "Firm Billing Code", "type": "string", "maxLength": 8 }, "branchCode": { "title": "NYSE Branch Code #", "type": "string" }, "employmentLocationStartDate": { "title": "Start Date", "$ref": "https://ramp-schemas-int.datacollection.qa.finra.org/forms/u4/models/0.0.1/common-data-definitions.json#/definitions/date", "messages": [ { "messageKey": "format", "messageText": "[{{#current['employmentLocationStartDate']}}] is not a valid date." }, { "messageKey": "required", "messageText": "The Employment Location Start Date is required." }, { "messageKey": "employmentLocationStartDateCannotBeAFutureDate", "messageText": "The Employment Location Start Date cannot be a future date." } ] }, "employmentLocationEndDate": { "title": "End Date", "$ref": "https://ramp-schemas-int.datacollection.qa.finra.org/forms/u4/models/0.0.1/common-data-definitions.json#/definitions/date", "messages": [ { "messageKey": "format", "messageText": "[{{#current['employmentLocationEndDate']}}] is not a valid date." }, { "messageKey": "employmentLocationEndDateShouldBeOnOrAfterStartDate", "messageText": "The Employment Location Start Date must be before the Employment Location End Date." }, { "messageKey": "employmentLocationEndDateCannotBeAFutureDate", "messageText": "The Employment Location End Date cannot be a future date." }, { "messageKey": "employmentLocationEndDateCannotBeDeleted", "messageText": "The Office of Employment Address End date is required for previous Office of Employments." }, { "messageKey": "isEmploymentLocationEndDateNotAfterBranchCloseDate", "messageText": "The Office of Employment End date shall not be after the Branch Close date." } ] }, "privateResidenceFlag": { "title": "If the Office of Employment address is a private residence, check this box.", "$ref": "https://ramp-schemas-int.datacollection.qa.finra.org/forms/u4/models/0.0.1/common-data-definitions.json#/definitions/yesNoType" }, "isResidentialSupervisoryLocation": { "$comment": "indicate if the current private residence is residential supervisory office location. This is only applicable to current non-registered private address", "title": "Indicator of Residential Supervisory Location", "$ref": "https://ramp-schemas-int.datacollection.qa.finra.org/forms/u4/models/0.0.1/common-data-definitions.json#/definitions/yesNoType", "messages": [ { "messageKey": "rslCannotBeSetIfNotCurrentLocation", "messageText": "Indicator of Residential Supervisory Location cannot be Yes if the office location is not current." }, { "messageKey": "rslCannotBeYesIfNotFinraRegistered", "messageText": "Indicator of Residential Supervisory Location cannot be Yes if the individual does not have or request any Finra registration." }, { "messageKey": "rslCannotBeSetForRegisteredLocationOrNonPrivateResidence", "messageText": "A non-registered address/location that is not a private residential, cannot be selected as a RSL (Residential supervisory location)." }, { "messageKey": "isResidentialSupervisoryLocationRequiredForCurrentNonRegisteredPrivateResidence", "messageText": "Indicator of Residential Supervisory Location is required if the current office location is a non-registered private residence." } ] }, "rslBeginDate": { "$comment": "Calculated field only when RSL indicator is set to true from false or null. Null value if calculation is not applicable. Don't input data.", "title": "RSL start Date", "$ref": "https://ramp-schemas-int.datacollection.qa.finra.org/forms/u4/models/0.0.1/common-data-definitions.json#/definitions/date", "eval": [ { "expression": "#hasValue({'SUBMITTED'}, #instanceMetadata['status']) and #previousInstanceMetadata ne null and #hasValue({'DRAFT'}, #previousInstanceMetadata['status']) and #current['isResidentialSupervisoryLocation'] eq true and #callLambda('arn:aws:lambda:us-east-1:465257512377:function:RAMPDI-cred-non-form-rules-DEVINT-01',{'requestKey':'isRSLFlagChangedToTrue', 'decafId':#firmOfficeLocationDecafId, 'diffWithBaseline':#diffWithBaseline }) ['response'] eq true ? #current['rslBeginDate'] = #callLambda('arn:aws:lambda:us-east-1:465257512377:function:RAMPDI-cred-non-form-rules-DEVINT-01',{'requestKey':'getLocalDateToday'}) ['response'] : true", "type": "SPEL", "comments": "Set to current date when submission and isResidentialSupervisoryLocation is changed to true from null or false", "additional-data": [ { "key": "firmOfficeLocationDecafId", "relativePath": "../id", "ignoreArrayIndicators": false } ] } ] }, "rslEndDate": { "$comment": "Calculated field only when RSL indicator is set to false or null from true. Null value if calculation is not applicable. Don't input data.", "title": "RSL end Date", "$ref": "https://ramp-schemas-int.datacollection.qa.finra.org/forms/u4/models/0.0.1/common-data-definitions.json#/definitions/date", "eval": [ { "expression": "#hasValue({'SUBMITTED'}, #instanceMetadata['status']) and #previousInstanceMetadata ne null and #hasValue({'DRAFT'}, #previousInstanceMetadata['status']) and #current['isResidentialSupervisoryLocation'] eq false and #callLambda('arn:aws:lambda:us-east-1:465257512377:function:RAMPDI-cred-non-form-rules-DEVINT-01',{'requestKey':'isRSLFlagChangedToFalse', 'decafId':#firmOfficeLocationDecafId, 'diffWithBaseline':#diffWithBaseline }) ['response'] eq true ? #current['rslEndDate'] = ( #current['employmentLocationEndDate'] ne null and #isValidDate(#current['employmentLocationEndDate'], 'yyyy-MM-dd') ? #current['employmentLocationEndDate'] : #callLambda('arn:aws:lambda:us-east-1:465257512377:function:RAMPDI-cred-non-form-rules-DEVINT-01',{'requestKey':'getLocalDateToday'}) ['response']) : true", "type": "SPEL", "comments": "Set to employmentLocationEndDate if exists or current date when submission and isResidentialSupervisoryLocation is changed to false from true", "additional-data": [ { "key": "firmOfficeLocationDecafId", "relativePath": "../id", "ignoreArrayIndicators": false } ] } ] }, "officeLocationType": { "title": "Type of Office", "$ref": "https://ramp-schemas-int.datacollection.qa.finra.org/forms/u4/models/0.0.1/common-data-definitions.json#/definitions/officeLocationType", "messages": [ { "messageKey": "ifLocationIsRegisteredThenLocationTypeRequired", "messageText": "If Employment Location is registered then Location Type is required." }, { "messageKey": "ifLocationIsNonRegisteredThenLocationTypeMustBeLocateAt", "messageText": "You must be 'located-at' all non-registered locations office locations." } ] }, "isRegisteredLocation": { "type": "boolean", "oneOf": [ { "const": true }, { "const": false } ] }, "bdMainOfficeIndicator": { "title": "BD Main", "type": "boolean" }, "iaMainOfficeIndicator": { "title": "IA Main", "type": "boolean" }, "address": { "$ref": "https://ramp-schemas-int.datacollection.qa.finra.org/forms/u4/models/0.0.1/common-data-definitions.json#/definitions/addressOptional" }, "baseline": { "$ref": "https://ramp-schemas-int.datacollection.qa.finra.org/forms/u4/models/0.0.1/decaf-common-definitions.json#/definitions/decafBaseline" } }, "allOf": [ { "if": { "properties": { "isRegisteredLocation": { "const": false } } }, "then": { "required": [ "address" ], "properties": { "address": { "title": "Non-Registered Office of Employment Address", "required": [ "addressLine1", "cityName", "countryCode" ], "properties": { "addressLine1": { "title": "Street 1", "maxLength": 50, "messages": [ { "messageKey": "isNonBlankString", "messageText": "'Street 1' is a required field. Please input a valid string for this field." } ] }, "addressLine2": { "title": "Street 2", "maxLength": 50 }, "cityName": { "title": "City", "maxLength": 50, "messages": [ { "messageKey": "isNonBlankString", "messageText": "'City' is a required field. Please input a valid string for this field." } ] }, "stateCode": { "maxLength": 2, "$ref": "https://ramp-schemas-int.datacollection.qa.finra.org/forms/u4/models/0.0.1/common-data-definitions.json#/definitions/usaState", "messages": [ { "messageKey": "stateAvailableOnlyForUSA", "messageText": "When a State is provided, the Country provided must be United States. Edit the Country and/or State." }, { "messageKey": "stateCodeRequired", "messageText": "When the country entered is United States, a State must be provided." } ] }, "postalCode": { "maxLength": 11, "messages": [ { "messageKey": "postalCodeRequired", "messageText": "If you supplied a State, you must enter a Postal Code." }, { "messageKey": "postalCodePattern", "messageText": "The Postal Code must be in one of the following formats: xxxxx or xxxxx-xxxx, when the country entered is United States." }, { "messageKey": "invalidPostalCodeForState", "messageText": "PostalCode is invalid for the State provided." } ] }, "countryCode": { "title": "Country" } } } } } }, { "if": { "properties": { "employmentLocationEndDate": { "not": true }, "isRegisteredLocation": { "const": false } } }, "then": { "properties": { "address": { "properties": { "countryCode": { "title": "Country", "$ref": "https://ramp-schemas-int.datacollection.qa.finra.org/forms/u4/models/0.0.1/common-data-definitions.json#/definitions/activeCountry" } } } } } }, { "if": { "properties": { "employmentLocationEndDate": { "not": false }, "isRegisteredLocation": { "const": false } } }, "then": { "properties": { "address": { "properties": { "countryCode": { "title": "Country", "$ref": "https://ramp-schemas-int.datacollection.qa.finra.org/forms/u4/models/0.0.1/common-data-definitions.json#/definitions/country" } } } } } } ] }