var SubmissionResources = { }; var OnChangeHandler = { }; var Actions = { A0: function(recordGuid) { var tmp = false; Actions.SetVisible('app_nationalityCountryId', tmp); }, A1: function(recordGuid) { var tmp = false; Actions.SetVisible('app_contactLanguageId', tmp); }, A2: function(recordGuid) { var tmp = operator.equal(Actions.GetValueOrDefaultOf('app_nationalityCountryId', 'Integer'),58); Actions.SetRequired('app_cpr', tmp); }, A3: function(recordGuid) { var tmp = Actions.AddMonths(Actions.AddYears(Actions.GetDateTimeToday(), operator.uminus(40)), operator.uminus(11)); Actions.SetDateMin('app_birthdate', tmp); }, A4: function(recordGuid) { var tmp = Actions.AddYears(Actions.GetDateTimeToday(), operator.uminus(17)); Actions.SetDateMax('app_birthdate', tmp); }, A5: function(recordGuid) { var tmp = false; Actions.SetVisible('app_genderId', tmp); }, A6: function(recordGuid) { var tmp = false; Actions.SetVisible('app_housingSituationId', tmp); }, A7: function(recordGuid) { var tmp = operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_housingSituation', 'String'),'KKIK kollegium'),operator.equal(Actions.GetValueOrDefaultOf('app_housingSituation', 'String'),'KKIK points')); Actions.SetVisible('app_currentResidence', tmp); }, A8: function(recordGuid) { var tmp = false; Actions.SetVisible('app_currentResidenceId', tmp); }, A9: function(recordGuid) { var tmp = operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_housingSituation', 'String'),'KKIK kollegium'),operator.equal(Actions.GetValueOrDefaultOf('app_housingSituation', 'String'),'KKIK points')); Actions.SetVisible('app_currentRoomNumber', tmp); }, A10: function(recordGuid) { var tmp = ((operator.and(Actions.GetValueOrDefaultOf('app_isExchangeStudent', 'Bool'),operator.equal(Actions.GetValueOrDefaultOf('CurrentLanguage', 'String'),'da-DK'))) ? (operator.not_equal(Actions.GetValueOrDefaultOf('app_education', 'String'),'Udvekslingsstuderende')) : (((operator.and(Actions.GetValueOrDefaultOf('app_isExchangeStudent', 'Bool'),operator.equal(Actions.GetValueOrDefaultOf('CurrentLanguage', 'String'),'en-GB'))) ? (operator.not_equal(Actions.GetValueOrDefaultOf('app_education', 'String'),'Exchange student')) : (false)))); var color = 'Red'; Actions.SetEmphasized('app_education', '9e300aee-a85e-4f18-ab05-d233c9376cca', tmp, color); }, A11: function(recordGuid) { var tmp = false; Actions.SetVisible('app_educationId', tmp); }, A12: function(recordGuid) { var tmp = operator.equal(Actions.GetValueOrDefaultOf('app_education', 'String'),'Andet'); Actions.SetVisible('app_educationOther', tmp); }, A13: function(recordGuid) { var tmp = Actions.AddMonths(Actions.GetDateTimeToday(), 3); Actions.SetDateMax('app_educationStart', tmp); }, A14: function(recordGuid) { var tmp = Actions.AddDays(Actions.GetValueOrDefaultOf('app_educationStart', 'Date'), 1); Actions.SetDateMin('app_educationEnd', tmp); }, A15: function(recordGuid) { var tmp = operator.and(operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_genderId', 'Integer'),2),operator.equal(Actions.GetValueOrDefaultOf('app_genderId', 'Integer'),3)),operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_genderId', 'Integer'),2),operator.equal(Actions.GetValueOrDefaultOf('app_genderId', 'Integer'),3))); Actions.SetVisible('app_isPregnant', tmp); }, A16: function(recordGuid) { var tmp = document.getElementById('Model_app_repeatedEmail').onpaste = function(e) { e.preventDefault(); return 1 ? '' : 0; };;if ((typeof tmp === 'number' && !Number.isFinite(tmp)) || tmp == Infinity) Actions.SetValueOf('app_repeatedEmail', '', undefined, false);else Actions.SetValueOf('app_repeatedEmail', tmp, undefined, false); }, A17: function(recordGuid) { var tmp = false; Actions.SetVisible('app_applicantCountryId', tmp); }, A18: function(recordGuid) { var tmp = operator.and(operator.or(operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Danmark'),operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Grønland')),operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Færøerne')),operator.or(operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Danmark'),operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Grønland')),operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Færøerne'))); Actions.SetVisible('app_applicantPostalCodeInsideKingdomOfDenmark', tmp); }, A19: function(recordGuid) { var tmp = operator.and(operator.not(operator.or(operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Danmark'),operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Grønland')),operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Færøerne'))),operator.not(operator.or(operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Danmark'),operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Grønland')),operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Færøerne')))); Actions.SetVisible('app_applicantPostalCodeOutsideKingdomOfDenmark', tmp); }, A20: function(recordGuid) { var tmp = Actions.GetDateTimeToday(); Actions.SetDateMin('app_desiredOccupationsDate', tmp); }, A21: function(recordGuid) { var tmp = Actions.AddMonths(Actions.GetDateTimeToday(), 12); Actions.SetDateMax('app_desiredOccupationsDate', tmp); }, A22: function(recordGuid) { var tmp = false; Actions.SetVisible('app_numberOfOccupantsId', tmp); }, A23: function(recordGuid) { var tmp = operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'2-personers'),operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'TwoPerson')); Actions.SetVisible('app_secondaryIsStudent', tmp); }, A24: function(recordGuid) { var tmp = operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'2-personers'),operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'TwoPerson')); Actions.SetVisible('app_secondaryName', tmp); }, A25: function(recordGuid) { var tmp = operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'2-personers'),operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'TwoPerson')); Actions.SetVisible('app_secondaryNationality', tmp); }, A26: function(recordGuid) { var tmp = operator.and(false,operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'2-personers'),operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'TwoPerson'))); Actions.SetVisible('app_secondaryNationalityCountryId', tmp); }, A27: function(recordGuid) { var tmp = operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'2-personers'),operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'TwoPerson')); Actions.SetVisible('app_secondaryContactLanguage', tmp); }, A28: function(recordGuid) { var tmp = operator.and(false,operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'2-personers'),operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'TwoPerson'))); Actions.SetVisible('app_secondaryContactLanguageId', tmp); }, A29: function(recordGuid) { var tmp = operator.equal(Actions.GetValueOrDefaultOf('app_secondaryNationalityCountryId', 'Integer'),58); Actions.SetRequired('app_secondaryCpr', tmp); }, A30: function(recordGuid) { var tmp = operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'2-personers'),operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'TwoPerson')); Actions.SetVisible('app_secondaryCpr', tmp); }, A31: function(recordGuid) { var tmp = Actions.AddYears(Actions.GetDateTimeToday(), operator.uminus(15)); Actions.SetDateMax('app_secondaryBirthdate', tmp); }, A32: function(recordGuid) { var tmp = operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'2-personers'),operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'TwoPerson')); Actions.SetVisible('app_secondaryBirthdate', tmp); }, A33: function(recordGuid) { var tmp = operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'2-personers'),operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'TwoPerson')); Actions.SetVisible('app_secondaryGender', tmp); }, A34: function(recordGuid) { var tmp = operator.and(false,operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'2-personers'),operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'TwoPerson'))); Actions.SetVisible('app_secondaryGenderId', tmp); }, A35: function(recordGuid) { var tmp = operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'2-personers'),operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'TwoPerson')); Actions.SetVisible('app_secondaryHousingSituation', tmp); }, A36: function(recordGuid) { var tmp = operator.and(false,operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'2-personers'),operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'TwoPerson'))); Actions.SetVisible('app_secondaryHousingSituationId', tmp); }, A37: function(recordGuid) { var tmp = operator.and(operator.equal(Actions.GetValueOrDefaultOf('app_secondaryHousingSituation', 'String'),'KKIK kollegium'),operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'2-personers'),operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'TwoPerson'))); Actions.SetVisible('app_secondaryCurrentResidence', tmp); }, A38: function(recordGuid) { var tmp = operator.and(false,operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'2-personers'),operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'TwoPerson'))); Actions.SetVisible('app_secondaryCurrentResidenceId', tmp); }, A39: function(recordGuid) { var tmp = operator.and(operator.equal(Actions.GetValueOrDefaultOf('app_secondaryHousingSituation', 'String'),'KKIK kollegium'),operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'2-personers'),operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'TwoPerson'))); Actions.SetVisible('app_secondaryCurrentRoomNumber', tmp); }, A40: function(recordGuid) { var tmp = operator.and(Actions.GetValueOrDefaultOf('app_secondaryIsStudent', 'Bool'),operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'2-personers'),operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'TwoPerson'))); Actions.SetVisible('app_secondaryIsExchangeStudent', tmp); }, A41: function(recordGuid) { var tmp = ((operator.and(Actions.GetValueOrDefaultOf('app_secondaryIsExchangeStudent', 'Bool'),operator.equal(Actions.GetValueOrDefaultOf('CurrentLanguage', 'String'),'da-DK'))) ? (operator.not_equal(Actions.GetValueOrDefaultOf('app_secondaryEducation', 'String'),'Udvekslingsstuderende')) : (((operator.and(Actions.GetValueOrDefaultOf('app_secondaryIsExchangeStudent', 'Bool'),operator.equal(Actions.GetValueOrDefaultOf('CurrentLanguage', 'String'),'en-GB'))) ? (operator.not_equal(Actions.GetValueOrDefaultOf('app_secondaryEducation', 'String'),'Exchange student')) : (false)))); var color = 'Red'; Actions.SetEmphasized('app_secondaryEducation', '92d88f54-bccb-4cde-907d-9cd9c6e11658', tmp, color); }, A42: function(recordGuid) { var tmp = operator.and(Actions.GetValueOrDefaultOf('app_secondaryIsStudent', 'Bool'),operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'2-personers'),operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'TwoPerson'))); Actions.SetVisible('app_secondaryEducation', tmp); }, A43: function(recordGuid) { var tmp = operator.and(false,operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'2-personers'),operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'TwoPerson'))); Actions.SetVisible('app_secondaryEducationId', tmp); }, A44: function(recordGuid) { var tmp = operator.and(operator.and(operator.equal(Actions.GetValueOrDefaultOf('app_secondaryEducation', 'String'),'Andet'),Actions.GetValueOrDefaultOf('app_secondaryIsStudent', 'Bool')),operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'2-personers'),operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'TwoPerson'))); Actions.SetVisible('app_secondaryEducationOther', tmp); }, A45: function(recordGuid) { var tmp = operator.and(Actions.GetValueOrDefaultOf('app_secondaryIsStudent', 'Bool'),operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'2-personers'),operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'TwoPerson'))); Actions.SetVisible('app_secondaryEducationStart', tmp); }, A46: function(recordGuid) { var tmp = Actions.AddDays(Actions.GetValueOrDefaultOf('app_secondaryEducationStart', 'Date'), 1); Actions.SetDateMin('app_secondaryEducationEnd', tmp); }, A47: function(recordGuid) { var tmp = operator.and(Actions.GetValueOrDefaultOf('app_secondaryIsStudent', 'Bool'),operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'2-personers'),operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'TwoPerson'))); Actions.SetVisible('app_secondaryEducationEnd', tmp); }, A48: function(recordGuid) { var tmp = operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'2-personers'),operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'TwoPerson')); Actions.SetVisible('app_secondaryRevenuePrMonth', tmp); }, A49: function(recordGuid) { var tmp = operator.and(operator.and(operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_secondaryGenderId', 'Integer'),2),operator.equal(Actions.GetValueOrDefaultOf('app_secondaryGenderId', 'Integer'),3)),operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_secondaryGenderId', 'Integer'),2),operator.equal(Actions.GetValueOrDefaultOf('app_secondaryGenderId', 'Integer'),3))),operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'2-personers'),operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'TwoPerson'))); Actions.SetVisible('app_secondaryIsPregnant', tmp); }, A50: function(recordGuid) { var tmp = operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'2-personers'),operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'TwoPerson')); Actions.SetVisible('app_secondarySpecialCircumstances', tmp); }, A51: function(recordGuid) { var tmp = operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'2-personers'),operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'TwoPerson')); Actions.SetVisible('app_secondaryEmail', tmp); }, A52: function(recordGuid) { var tmp = document.getElementById('Model_app_secondaryRepeatedEmail').onpaste = function(e) { e.preventDefault(); return 1 ? '' : 0; };;if ((typeof tmp === 'number' && !Number.isFinite(tmp)) || tmp == Infinity) Actions.SetValueOf('app_secondaryRepeatedEmail', '', undefined, false);else Actions.SetValueOf('app_secondaryRepeatedEmail', tmp, undefined, false); }, A53: function(recordGuid) { var tmp = operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'2-personers'),operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'TwoPerson')); Actions.SetVisible('app_secondaryRepeatedEmail', tmp); }, A54: function(recordGuid) { var tmp = operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'2-personers'),operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'TwoPerson')); Actions.SetVisible('app_secondaryMobile', tmp); }, A55: function(recordGuid) { var tmp = operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'2-personers'),operator.equal(Actions.GetValueOrDefaultOf('app_numberOfOccupants', 'String'),'TwoPerson')); Actions.SetVisible('app_secondaryAccept', tmp); }, A56: function(recordGuid) { var tmp = Actions.GetValueOrDefaultOf('app_sumHasKids', 'Bool'); Actions.SetVisible('app_dependentChildren', tmp); }, A57: function(recordGuid) { var tmp = false; Actions.SetVisible('app_dependentChildrenId', tmp); }, A58: function(recordGuid) { var tmp = Actions.GetValueOrDefaultOf('app_sumHasKids', 'Bool'); Actions.SetVisible('app_hasJointCustody', tmp); }, A59: function(recordGuid) { var tmp = Actions.GetValueOrDefaultOf('app_sumHasKids', 'Bool'); Actions.SetVisible('app_hasVisitationRight', tmp); }, A60: function(recordGuid) { var tmp = Actions.AddYears(Actions.GetDateTimeToday(), operator.uminus(18)); Actions.SetDateMin('app_firstChildBirthdate', tmp); }, A61: function(recordGuid) { var tmp = Actions.GetDateTimeToday(); Actions.SetDateMax('app_firstChildBirthdate', tmp); }, A62: function(recordGuid) { var tmp = Actions.GetValueOrDefaultOf('app_sumHasKids', 'Bool'); Actions.SetVisible('app_firstChildBirthdate', tmp); }, A63: function(recordGuid) { var tmp = operator.and(operator.greater_or_equal(Actions.GetValueOrDefaultOf('app_dependentChildrenId', 'Integer'),2),Actions.GetValueOrDefaultOf('app_sumHasKids', 'Bool')); Actions.SetVisible('app_secondChildBirthdate', tmp); }, A64: function(recordGuid) { var tmp = Actions.AddYears(Actions.GetDateTimeToday(), operator.uminus(18)); Actions.SetDateMin('app_secondChildBirthdate', tmp); }, A65: function(recordGuid) { var tmp = Actions.GetDateTimeToday(); Actions.SetDateMax('app_secondChildBirthdate', tmp); }, A66: function(recordGuid) { var tmp = operator.and(operator.greater_or_equal(Actions.GetValueOrDefaultOf('app_dependentChildrenId', 'Integer'),3),Actions.GetValueOrDefaultOf('app_sumHasKids', 'Bool')); Actions.SetVisible('app_thirdChildBirthdate', tmp); }, A67: function(recordGuid) { var tmp = Actions.AddYears(Actions.GetDateTimeToday(), operator.uminus(18)); Actions.SetDateMin('app_thirdChildBirthdate', tmp); }, A68: function(recordGuid) { var tmp = Actions.GetDateTimeToday(); Actions.SetDateMax('app_thirdChildBirthdate', tmp); }, A69: function(recordGuid) { var tmp = operator.and(operator.equal(Actions.GetValueOrDefaultOf('app_dependentChildrenId', 'Integer'),4),Actions.GetValueOrDefaultOf('app_sumHasKids', 'Bool')); Actions.SetVisible('app_fourthChildBirthdate', tmp); }, A70: function(recordGuid) { var tmp = Actions.AddYears(Actions.GetDateTimeToday(), operator.uminus(18)); Actions.SetDateMin('app_fourthChildBirthdate', tmp); }, A71: function(recordGuid) { var tmp = Actions.GetDateTimeToday(); Actions.SetDateMax('app_fourthChildBirthdate', tmp); }, A72: function(recordGuid) { $.each(Actions.GetRecordArgs({name: 'attachmentCategoryId', parentName: 'app_newApplicantAttachments', guid: recordGuid}), function(index, recordArgs) { var tmp = operator.not(operator.and(operator.equal(recordArgs.parentName,'app_newApplicantAttachments'),operator.not(false))); Actions.SetVisible('attachmentCategoryId', tmp, recordArgs); }); }, A73: function(recordGuid) { var tmp = operator.and(operator.or(Actions.IsEmptyString(Actions.GetValueOf('app_cpr', 'String')),operator.equal(Actions.GetValueOrDefaultOf('app_cpr', 'String'),'')),operator.not(Actions.IsEmptyString(Actions.GetValueOf('app_birthdate', 'Date')))); Actions.SetValueOf('app_cprEmptyAndBirthdateNotEmpty_var', tmp, undefined, true); }, A74: function(recordGuid) { var tmp = operator.not_equal(Actions.Length(moment.utc(Actions.GetValueOrDefaultOf('app_birthdate', 'Date')).format(util.GetMomentDateTimeFormat())),16); Actions.SetValueOf('app_birthdateNotLengthSixteen_var', tmp, undefined, true); }, A75: function(recordGuid) { var tmp = Actions.Substring(Actions.GetValueOrDefaultOf('app_cpr', 'String'), 0, 6); Actions.SetValueOf('app_birthdateFromCpr_var', tmp, undefined, true); }, A76: function(recordGuid) { var tmp = operator.plus(Actions.Substring(Actions.Replace(moment.utc(Actions.GetValueOrDefaultOf('app_birthdate', 'Date')).format(util.GetMomentDateTimeFormat()), '-', ''), 0, 4),Actions.Substring(Actions.Replace(moment.utc(Actions.GetValueOrDefaultOf('app_birthdate', 'Date')).format(util.GetMomentDateTimeFormat()), '-', ''), 6, 8)); Actions.SetValueOf('app_birthdateToString_var', tmp, undefined, true); }, A77: function(recordGuid) { var tmp = operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_genderId', 'Integer'),2),operator.equal(Actions.GetValueOrDefaultOf('app_genderId', 'Integer'),3)); Actions.SetVisible('1d1c237a-514a-428e-8a67-cc9448376314', tmp); }, A78: function(recordGuid) { var tmp = operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_genderId', 'Integer'),2),operator.equal(Actions.GetValueOrDefaultOf('app_genderId', 'Integer'),3)); Actions.SetVisible('6ff31f33-3504-4385-bd6f-013aefc40de6', tmp); }, A79: function(recordGuid) { var tmp = operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_genderId', 'Integer'),2),operator.equal(Actions.GetValueOrDefaultOf('app_genderId', 'Integer'),3)); Actions.SetVisible('44b3f11e-9ec6-4f7e-877f-d7d9673851c8', tmp); }, A80: function(recordGuid) { var tmp = operator.not(operator.or(operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Danmark'),operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Grønland')),operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Færøerne'))); Actions.SetVisible('9c9e8694-feaa-4636-8001-ecc185d315d6', tmp); }, A81: function(recordGuid) { var tmp = operator.not(operator.or(operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Danmark'),operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Grønland')),operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Færøerne'))); Actions.SetVisible('d5cc3aaf-d18e-407d-a350-ff9ba7c22283', tmp); }, A82: function(recordGuid) { var tmp = operator.not(operator.or(operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Danmark'),operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Grønland')),operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Færøerne'))); Actions.SetVisible('49f925c4-f8aa-4bb3-9e88-06b2ab1b3572', tmp); }, A83: function(recordGuid) { var tmp = operator.or(operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Danmark'),operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Grønland')),operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Færøerne')); Actions.SetVisible('3963097c-a548-446d-aa4d-f299b978de4c', tmp); }, A84: function(recordGuid) { var tmp = operator.or(operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Danmark'),operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Grønland')),operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Færøerne')); Actions.SetVisible('b6e2b22a-0273-4201-914d-47ad56dd2e17', tmp); }, A85: function(recordGuid) { var tmp = operator.or(operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Danmark'),operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Grønland')),operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Færøerne')); Actions.SetVisible('67f2ebd4-45bc-4804-b23a-c358f52f656c', tmp); }, A86: function(recordGuid) { var tmp = false; Actions.SetVisible('8ed9b7b6-da3a-475d-8a1a-d1fbb65b5e9f', tmp); }, A87: function(recordGuid) { var tmp = false; Actions.SetVisible('07beb44a-0d27-4241-bd57-e666c72398e0', tmp); }, A88: function(recordGuid) { var tmp = Actions.GetValueOrDefaultOf('app_secondaryIsStudent', 'Bool'); Actions.SetVisible('250c8c48-ec19-4be0-88de-c7beaa480207', tmp); }, A89: function(recordGuid) { var tmp = operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_secondaryGenderId', 'Integer'),2),operator.equal(Actions.GetValueOrDefaultOf('app_secondaryGenderId', 'Integer'),3)); Actions.SetVisible('8b77ae32-fe04-445c-9e86-560f6e592d3b', tmp); }, A90: function(recordGuid) { var tmp = operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_secondaryGenderId', 'Integer'),2),operator.equal(Actions.GetValueOrDefaultOf('app_secondaryGenderId', 'Integer'),3)); Actions.SetVisible('3d4a700e-f9e8-41f5-a567-985208e2d205', tmp); }, A91: function(recordGuid) { var tmp = operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_secondaryGenderId', 'Integer'),2),operator.equal(Actions.GetValueOrDefaultOf('app_secondaryGenderId', 'Integer'),3)); Actions.SetVisible('d68aa3d7-8f17-4f48-9c7d-5ec6ae959306', tmp); }, A92: function(recordGuid) { var tmp = false; Actions.SetVisible('966f2583-dc4c-496d-90f7-7372c60d7f6f', tmp); }, A93: function(recordGuid) { var tmp = Actions.GetValueOrDefaultOf('app_sumHasKids', 'Bool'); Actions.SetVisible('8929a7fa-0569-4bda-9ced-d1f8a0e5799b', tmp); }, A94: function(recordGuid) { var tmp = false; Actions.SetVisible('5e6f0038-aef5-4aa0-aaa6-86c33f48090f', tmp); }, A95: function(recordGuid) { $.each(Actions.GetRecordArgs({name: 'fc591015-24c1-47b0-a575-2d4793520245', parentName: 'app_newApplicantAttachments', guid: recordGuid}), function(index, recordArgs) { var tmp = false; Actions.SetVisible('fc591015-24c1-47b0-a575-2d4793520245', tmp, recordArgs); }); }, A96: function(recordGuid) { var tmp = operator.not(operator.or(operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Danmark'),operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Grønland')),operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Færøerne'))); Actions.SetVisible('91f5d82c-43d3-43b1-89c8-f0eb23ed823b', tmp); }, A97: function(recordGuid) { var tmp = operator.or(operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Danmark'),operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Grønland')),operator.equal(Actions.GetValueOrDefaultOf('app_applicantCountry', 'String'),'Færøerne')); Actions.SetVisible('0cb7657b-09c9-41d7-a188-ea30b2870a79', tmp); }, A98: function(recordGuid) { var tmp = Actions.GetValueOrDefaultOf('app_secondaryIsStudent', 'Bool'); Actions.SetVisible('ca42191a-8974-46fc-885a-d9be2530bfe6', tmp); }, A99: function(recordGuid) { var tmp = Actions.GetValueOrDefaultOf('app_secondaryIsStudent', 'Bool'); Actions.SetVisible('9e400b37-a037-4156-bf13-32aedde0d555', tmp); }, A100: function(recordGuid) { var tmp = Actions.GetValueOrDefaultOf('app_sumHasKids', 'Bool'); Actions.SetVisible('75fc9e2b-cc66-4f2b-840d-169c18da32cc', tmp); }, A101: function(recordGuid) { Actions.SetInlineValidationStatus('V_app_accept_val'); }, A102: function(recordGuid) { Actions.SetInlineValidationStatus('V_app_secondaryAccept_val'); }, A103: function(recordGuid) { Actions.SetInlineValidationStatus('V_app_repeatedEmail_val'); }, A104: function(recordGuid) { Actions.SetInlineValidationStatus('V_app_secondaryRepeatedEmail_val'); }, A105: function(recordGuid) { Actions.SetInlineValidationStatus('V_app_secondaryAndPrimaryEmailAreEqual_val'); }, A106: function(recordGuid) { Actions.SetInlineValidationStatus('V_app_desiredOccupationsDate_val'); }, A107: function(recordGuid) { Actions.SetInlineValidationStatus('V_app_educationEnd_val'); }, A108: function(recordGuid) { Actions.SetInlineValidationStatus('V_app_secondaryEducationEnd_val'); }, A109: function(recordGuid) { Actions.SetInlineValidationStatus('V_app_ifExchangeStudent_val'); }, A110: function(recordGuid) { Actions.SetInlineValidationStatus('V_app_ifSecondaryExchangeStudent_val'); }, A111: function(recordGuid) { Actions.SetInlineValidationStatus('V_app_maxApplicantAttachments_val'); }, A112: function(recordGuid) { Actions.SetInlineValidationStatus('V_app_cprAndBirthdayMustMatch_val'); }}; var ActionNames = ['A111','A109','A107','A106','A101','A100','A97','A96','A95','A94','A93','A92','A91','A90','A89','A87','A86','A85','A84','A83','A82','A81','A80','A79','A78','A77','A76','A75','A74','A73','A112','A72','A71','A70','A69','A68','A67','A66','A65','A64','A63','A62','A61','A60','A59','A58','A57','A56','A55','A102','A54','A53','A52','A51','A105','A104','A50','A49','A48','A43','A38','A36','A35','A39','A37','A34','A33','A32','A31','A30','A29','A28','A27','A26','A25','A24','A23','A99','A98','A88','A47','A45','A108','A46','A42','A44','A40','A110','A41','A22','A21','A20','A19','A18','A17','A16','A103','A15','A14','A13','A12','A11','A10','A9','A8','A7','A6','A5','A4','A3','A2','A1','A0']; var ValidationActionNames = ['A111','A109','A107','A106','A101','A112','A102','A105','A104','A108','A110','A103'] var GlobalActionNames = ['A111','A109','A107','A106','A101','A100','A97','A96','A94','A93','A92','A91','A90','A89','A87','A86','A85','A84','A83','A82','A81','A80','A79','A78','A77','A76','A75','A74','A73','A112','A71','A70','A69','A68','A67','A66','A65','A64','A63','A62','A61','A60','A59','A58','A57','A56','A55','A102','A54','A53','A52','A51','A105','A104','A50','A49','A48','A43','A38','A36','A35','A39','A37','A34','A33','A32','A31','A30','A29','A28','A27','A26','A25','A24','A23','A99','A98','A88','A47','A45','A108','A46','A42','A44','A40','A110','A41','A22','A21','A20','A19','A18','A17','A16','A103','A15','A14','A13','A12','A11','A10','A9','A8','A7','A6','A5','A4','A3','A2','A1','A0']; var ListActionNames = { 'app_newApplicantAttachments': ['A95','A72'], }; var Dependencies = { 'app_nationalityCountryId': { 'Dependencies': [Actions.A2] }, 'app_housingSituation': { 'Dependencies': [Actions.A9,Actions.A7] }, 'app_isExchangeStudent': { 'Dependencies': [Actions.A109,Actions.A10] }, 'CurrentLanguage': { 'Dependencies': [Actions.A41,Actions.A10] }, 'app_education': { 'Dependencies': [Actions.A109,Actions.A110,Actions.A12,Actions.A10] }, 'app_educationStart': { 'Dependencies': [Actions.A107,Actions.A106,Actions.A14] }, 'app_genderId': { 'Dependencies': [Actions.A79,Actions.A78,Actions.A77,Actions.A15] }, 'app_applicantCountry': { 'Dependencies': [Actions.A97,Actions.A96,Actions.A85,Actions.A84,Actions.A83,Actions.A82,Actions.A81,Actions.A80,Actions.A19,Actions.A18] }, 'app_numberOfOccupants': { 'Dependencies': [Actions.A55,Actions.A102,Actions.A54,Actions.A53,Actions.A51,Actions.A105,Actions.A104,Actions.A50,Actions.A49,Actions.A48,Actions.A43,Actions.A38,Actions.A36,Actions.A35,Actions.A39,Actions.A37,Actions.A34,Actions.A33,Actions.A32,Actions.A30,Actions.A28,Actions.A27,Actions.A26,Actions.A25,Actions.A24,Actions.A23,Actions.A99,Actions.A98,Actions.A88,Actions.A47,Actions.A45,Actions.A108,Actions.A46,Actions.A42,Actions.A44,Actions.A40,Actions.A110,Actions.A41] }, 'app_secondaryNationalityCountryId': { 'Dependencies': [Actions.A29] }, 'app_secondaryHousingSituation': { 'Dependencies': [Actions.A39,Actions.A37] }, 'app_secondaryIsStudent': { 'Dependencies': [Actions.A99,Actions.A98,Actions.A88,Actions.A47,Actions.A45,Actions.A108,Actions.A46,Actions.A42,Actions.A44,Actions.A40,Actions.A110,Actions.A41] }, 'app_secondaryIsExchangeStudent': { 'Dependencies': [Actions.A110,Actions.A41] }, 'app_secondaryEducation': { 'Dependencies': [Actions.A44,Actions.A110,Actions.A41] }, 'app_secondaryEducationStart': { 'Dependencies': [Actions.A108,Actions.A46] }, 'app_secondaryGenderId': { 'Dependencies': [Actions.A91,Actions.A90,Actions.A89,Actions.A49] }, 'app_sumHasKids': { 'Dependencies': [Actions.A100,Actions.A93,Actions.A69,Actions.A66,Actions.A63,Actions.A62,Actions.A59,Actions.A58,Actions.A56] }, 'app_dependentChildrenId': { 'Dependencies': [Actions.A69,Actions.A66,Actions.A63] }, 'app_cpr': { 'Dependencies': [Actions.A75,Actions.A73,Actions.A112] }, 'app_birthdate': { 'Dependencies': [Actions.A76,Actions.A74,Actions.A73,Actions.A112] }, 'app_accept': { 'Dependencies': [Actions.A101] }, 'app_secondaryAccept': { 'Dependencies': [Actions.A102] }, 'app_email': { 'Dependencies': [Actions.A105,Actions.A103] }, 'app_repeatedEmail': { 'Dependencies': [Actions.A103] }, 'app_secondaryEmail': { 'Dependencies': [Actions.A105,Actions.A104] }, 'app_secondaryRepeatedEmail': { 'Dependencies': [Actions.A104] }, 'app_desiredOccupationsDate': { 'Dependencies': [Actions.A106] }, 'app_educationEnd': { 'Dependencies': [Actions.A107] }, 'app_secondaryEducationEnd': { 'Dependencies': [Actions.A108] }, 'app_newApplicantAttachments': { 'Dependencies': [Actions.A111] }, 'app_cprEmptyAndBirthdateNotEmpty_var': { 'Dependencies': [Actions.A112] }, 'app_birthdateNotLengthSixteen_var': { 'Dependencies': [Actions.A112] }, 'app_birthdateFromCpr_var': { 'Dependencies': [Actions.A112] }, 'app_birthdateToString_var': { 'Dependencies': [Actions.A112] } }; var InlineValidations = { V_app_accept_val : { Pages : [0], Property : 'app_accept', ListName : '', ValidationFunction : function (recordArgs) { var tmp = Actions.GetValueOrDefaultOf('app_accept', 'Bool'); return tmp; }, }, V_app_secondaryAccept_val : { Pages : [2], Property : 'app_secondaryAccept', ListName : '', ValidationFunction : function (recordArgs) { var tmp = Actions.GetValueOrDefaultOf('app_secondaryAccept', 'Bool'); return tmp; }, }, V_app_repeatedEmail_val : { Pages : [0], Property : '', ListName : '', ValidationFunction : function (recordArgs) { var tmp = operator.equal(Actions.GetValueOrDefaultOf('app_email', 'EMail'),Actions.GetValueOrDefaultOf('app_repeatedEmail', 'EMail')); return tmp; }, }, V_app_secondaryRepeatedEmail_val : { Pages : [2], Property : '', ListName : '', ValidationFunction : function (recordArgs) { var tmp = operator.equal(Actions.GetValueOrDefaultOf('app_secondaryEmail', 'EMail'),Actions.GetValueOrDefaultOf('app_secondaryRepeatedEmail', 'EMail')); return tmp; }, }, V_app_secondaryAndPrimaryEmailAreEqual_val : { Pages : [2], Property : '', ListName : '', ValidationFunction : function (recordArgs) { var tmp = operator.not_equal(Actions.GetValueOrDefaultOf('app_secondaryEmail', 'EMail'),Actions.GetValueOrDefaultOf('app_email', 'EMail')); return tmp; }, }, V_app_desiredOccupationsDate_val : { Pages : [1], Property : '', ListName : '', ValidationFunction : function (recordArgs) { var tmp = operator.greater_or_equal(Actions.GetValueOrDefaultOf('app_desiredOccupationsDate', 'Date'),Actions.AddMonths(Actions.GetValueOrDefaultOf('app_educationStart', 'Date'), operator.uminus(3))); return tmp; }, }, V_app_educationEnd_val : { Pages : [0], Property : '', ListName : '', ValidationFunction : function (recordArgs) { var tmp = operator.or(Actions.IsEmptyString(Actions.GetValueOf('app_educationStart', 'Date')),operator.greater_or_equal(Actions.GetValueOrDefaultOf('app_educationEnd', 'Date'),Actions.GetValueOrDefaultOf('app_educationStart', 'Date'))); return tmp; }, }, V_app_secondaryEducationEnd_val : { Pages : [2], Property : '', ListName : '', ValidationFunction : function (recordArgs) { var tmp = operator.or(Actions.IsEmptyString(Actions.GetValueOf('app_secondaryEducationStart', 'Date')),operator.greater_or_equal(Actions.GetValueOrDefaultOf('app_secondaryEducationEnd', 'Date'),Actions.GetValueOrDefaultOf('app_secondaryEducationStart', 'Date'))); return tmp; }, }, V_app_ifExchangeStudent_val : { Pages : [0], Property : '', ListName : '', ValidationFunction : function (recordArgs) { var tmp = ((Actions.GetValueOrDefaultOf('app_isExchangeStudent', 'Bool')) ? (operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_education', 'String'),'Udvekslingsstuderende'),operator.equal(Actions.GetValueOrDefaultOf('app_education', 'String'),'Exchange student'))) : (true)); return tmp; }, }, V_app_ifSecondaryExchangeStudent_val : { Pages : [2], Property : '', ListName : '', ValidationFunction : function (recordArgs) { var tmp = ((Actions.GetValueOrDefaultOf('app_secondaryIsExchangeStudent', 'Bool')) ? (operator.or(operator.equal(Actions.GetValueOrDefaultOf('app_secondaryEducation', 'String'),'Udvekslingsstuderende'),operator.equal(Actions.GetValueOrDefaultOf('app_education', 'String'),'Exchange student'))) : (true)); return tmp; }, }, V_app_maxApplicantAttachments_val : { Pages : [4], Property : '', ListName : '', ValidationFunction : function (recordArgs) { var tmp = operator.greater_or_equal(10,Actions.ListLength('app_newApplicantAttachments')); return tmp; }, }, V_app_cprAndBirthdayMustMatch_val : { Pages : [0], Property : '', ListName : '', ValidationFunction : function (recordArgs) { var tmp = ((Actions.GetValueOrDefaultOf('app_cprEmptyAndBirthdateNotEmpty_var', 'Bool')) ? (true) : (((Actions.GetValueOrDefaultOf('app_birthdateNotLengthSixteen_var', 'Bool')) ? (true) : (operator.equal(Actions.GetValueOrDefaultOf('app_birthdateFromCpr_var', 'String'),Actions.GetValueOrDefaultOf('app_birthdateToString_var', 'String')))))); return tmp; }, }}; var submitScriptData = { EnumTranslate: { }, PropertyFormats: { }, SaveUrl: '/SelfService/submission/save/app_applicant', SaveUploadUrl: '/SelfService/submission/saveupload/app_applicant', RemoveUploadUrl: '/SelfService/submission/removeupload/app_applicant', NewRecordInputUrl: '/SelfService/submission/NewRecordInput/app_applicant', WebActionUrl: '/SelfService/webaction/execute/app_applicant', AutoCompleteUrl: '/SelfService/autocomplete/execute/app_applicant', UICultureString: 'da-DK', LocaleString: 'da-DK', WeekNumberCulture: 'da-DK', LocaleDecimalSeparator: ',', LocaleThousandSeparator: '.', LocaleTimeSeparator: ':', LocaleDateSeparator: '-', ClientValidationEnabled: true, ClientInlineValidationEnabled: true, IntFormat: { NumberOfDecimals: 0, FixedDecimals: true, ThousandGroupingEnabled: false }, DecimalFormat: { NumberOfDecimals: 2, FixedDecimals: true, ThousandGroupingEnabled: true }, DoubleFormat: { NumberOfDecimals: 4, FixedDecimals: false, ThousandGroupingEnabled: false }, LocaleCheckmark: '✔', MaxUploadSize: 5000, MapBoundaries: { North: '0', South: '0', East: '0', West: '0' }, ContactProperties: [ ] , SaveDraftDataInterval: 10000, ReplyKey: '', DatePicker: { MomentDateFormat: 'DD[-]MM[-]YYYY', MomentTimeFormat: 'HH:mm', JqueryDateFormat: 'dd\'-\'mm\'-\'yy', JqueryTimeFormat: 'HH:mm', FirstDay: 1, IsRightToLeft: false, ShowMonthAfterYear: false, DefaultDateTimeMinuteIncrement: 1, DefaultDateTimeMinimumHour: 0, DefaultDateTimeMaximumHour: 23, DatePickerImage: '/SelfService/Themes/v2/Images/svg-icons/insert-invitation.svg', } }