var SubmissionResources = { }; var OnChangeHandler = { }; var Actions = { A0: function(recordGuid) { var tmp = !((((Actions.GetValueOrDefaultOf('byh_associationMunicipality', 'Enumeration') == 'aarhus') || (Actions.GetValueOrDefaultOf('byh_associationMunicipality', 'Enumeration') == 'odense')) || (Actions.GetValueOrDefaultOf('byh_associationMunicipality', 'Enumeration') == 'aalborg'))); Actions.SetVisible('byh_associationZipCode', tmp); }, A1: function(recordGuid) { var tmp = !((((Actions.GetValueOrDefaultOf('byh_associationMunicipality', 'Enumeration') == 'aarhus') || (Actions.GetValueOrDefaultOf('byh_associationMunicipality', 'Enumeration') == 'odense')) || (Actions.GetValueOrDefaultOf('byh_associationMunicipality', 'Enumeration') == 'aalborg'))); Actions.SetVisible('byh_associationTown', tmp); }, A2: function(recordGuid) { var tmp = ((Actions.GetValueOrDefaultOf('byh_association', 'Enumeration') == 'cooperative') || (Actions.GetValueOrDefaultOf('byh_association', 'Enumeration') == 'owner')); Actions.SetVisible('byh_associationSubscription', tmp); }, A3: function(recordGuid) { var tmp = (Actions.GetValueOrDefaultOf('byh_associationMunicipality', 'Enumeration') == 'aarhus'); Actions.SetVisible('byh_zipcodeAarhus', tmp); }, A4: function(recordGuid) { var tmp = (Actions.GetValueOrDefaultOf('byh_associationMunicipality', 'Enumeration') == 'odense'); Actions.SetVisible('byh_zipcodeOdense', tmp); }, A5: function(recordGuid) { var tmp = (Actions.GetValueOrDefaultOf('byh_associationMunicipality', 'Enumeration') == 'aalborg'); Actions.SetVisible('byh_zipcodeAalborg', tmp); }, A6: function(recordGuid) { var tmp = (Actions.GetValueOrDefaultOf('common_contactperson', 'Enumeration') == 'yes'); Actions.SetVisible('common_contactName', tmp); }, A7: function(recordGuid) { var tmp = (Actions.GetValueOrDefaultOf('common_contactperson', 'Enumeration') == 'yes'); Actions.SetVisible('common_contactEmail', tmp); }, A8: function(recordGuid) { var tmp = (Actions.GetValueOrDefaultOf('common_contactperson', 'Enumeration') == 'yes'); Actions.SetVisible('common_contactPhone', tmp); }, A9: function(recordGuid) { var tmp = (Actions.GetValueOrDefaultOf('common_contactperson', 'Enumeration') == 'yes'); Actions.SetVisible('common_contactRelation', tmp); }, A10: function(recordGuid) { var tmp = (Number((Number(Actions.GetValueOrDefaultOf('byh_projectPlanning', 'Decimal')) + Number(Actions.GetValueOrDefaultOf('byh_projectMaterial', 'Decimal')))) + Number(Actions.GetValueOrDefaultOf('byh_projectConstruction', 'Decimal')));if ((typeof tmp === 'number' && isNaN(tmp)) || tmp == Infinity) Actions.SetValueOf('byh_projectTotal', '', undefined, false);else Actions.SetValueOf('byh_projectTotal', ValueExpr.FormatDecimal(tmp), undefined, false); }, A11: function(recordGuid) { var tmp = true; Actions.SetReadOnly('byh_projectTotal', tmp, 2); }, A12: function(recordGuid) { var tmp = (Actions.GetValueOrDefaultOf('byh_association', 'Enumeration') == 'privat'); Actions.SetVisible('65bc9abd-2dce-4d50-b098-8101609de5d1', tmp); }, A13: function(recordGuid) { var tmp = ((Actions.GetValueOrDefaultOf('byh_association', 'Enumeration') == 'cooperative') || (Actions.GetValueOrDefaultOf('byh_association', 'Enumeration') == 'owner')); Actions.SetVisible('ba9d76df-c4c0-4b0f-9ad7-41c8adaee64d', tmp); }, A14: function(recordGuid) { var tmp = (Actions.GetValueOrDefaultOf('common_contactperson', 'Enumeration') == 'yes'); Actions.SetVisible('5aba59bc-da9b-4fc0-bb63-37e0bd416125', tmp); }, A15: function(recordGuid) { var tmp = (Actions.GetValueOrDefaultOf('common_contactperson', 'Enumeration') == 'yes'); Actions.SetVisible('4369f761-3121-4ce1-a5d1-23a9a05c0330', tmp); }, A16: function(recordGuid) { var tmp = (Actions.GetValueOrDefaultOf('common_contactperson', 'Enumeration') == 'yes'); Actions.SetVisible('9c13d3cc-1099-4168-8380-72a0e0ab7837', tmp); }, A17: function(recordGuid) { var tmp = (Actions.GetValueOrDefaultOf('common_contactperson', 'Enumeration') == 'yes'); Actions.SetVisible('877eb561-df44-4f75-b82e-1430cd80414c', tmp); }, A18: function(recordGuid) { var tmp = (Actions.GetValueOrDefaultOf('byh_associationMunicipality', 'Enumeration') == 'aarhus'); Actions.SetVisible('6748a237-9944-4fd2-a4fe-c0c5769cdb6c', tmp); }, A19: function(recordGuid) { var tmp = (Actions.GetValueOrDefaultOf('byh_associationMunicipality', 'Enumeration') == 'odense'); Actions.SetVisible('dee42557-ce48-413e-ad97-72e6b5b59f94', tmp); }, A20: function(recordGuid) { var tmp = (Actions.GetValueOrDefaultOf('byh_associationMunicipality', 'Enumeration') == 'aalborg'); Actions.SetVisible('72f70f7b-f087-4e53-bc5b-28cd21cd16f8', tmp); }, A21: function(recordGuid) { var tmp = !((((Actions.GetValueOrDefaultOf('byh_associationMunicipality', 'Enumeration') == 'aarhus') || (Actions.GetValueOrDefaultOf('byh_associationMunicipality', 'Enumeration') == 'odense')) || (Actions.GetValueOrDefaultOf('byh_associationMunicipality', 'Enumeration') == 'aalborg'))); Actions.SetVisible('c27c879d-1bdf-4a8a-ae82-9f7ab776f25a', tmp); }, A22: function(recordGuid) { var tmp = !((((Actions.GetValueOrDefaultOf('byh_associationMunicipality', 'Enumeration') == 'aarhus') || (Actions.GetValueOrDefaultOf('byh_associationMunicipality', 'Enumeration') == 'odense')) || (Actions.GetValueOrDefaultOf('byh_associationMunicipality', 'Enumeration') == 'aalborg'))); Actions.SetVisible('53893602-0e97-4421-b0ce-2d3329e2820c', tmp); }, A23: function(recordGuid) { var tmp = (Actions.GetValueOrDefaultOf('byh_freeArea', 'Enumeration') == 'yes'); Actions.SetVisible('76eb59e6-cc9c-4c72-b044-9cafc3ac14ba', tmp); }, A24: function(recordGuid) { var tmp = (Actions.GetValueOrDefaultOf('byh_associationMunicipality', 'Enumeration') == 'aarhus'); Actions.SetVisible('bc09d75f-5172-4e7a-878f-bb3b94be90d1', tmp); }, A25: function(recordGuid) { var tmp = (Actions.GetValueOrDefaultOf('byh_associationMunicipality', 'Enumeration') == 'odense'); Actions.SetVisible('28e58026-8fe2-45d6-aca9-7887f2c34425', tmp); }, A26: function(recordGuid) { var tmp = (Actions.GetValueOrDefaultOf('byh_associationMunicipality', 'Enumeration') == 'aalborg'); Actions.SetVisible('390eaf42-db73-4782-892c-e8f1336640ef', tmp); }, A27: function(recordGuid) { Actions.SetInlineValidationStatus('V_byh_grantAmountMore_validation'); }, A28: function(recordGuid) { Actions.SetInlineValidationStatus('V_byh_grantAmountLess_validation'); }, A29: function(recordGuid) { Actions.SetInlineValidationStatus('V_byh_freeArea_validation'); }, A30: function(recordGuid) { Actions.SetInlineValidationStatus('V_byh_declaration_validation'); }}; var ActionNames = ['A30','A29','A26','A25','A24','A23','A22','A21','A20','A19','A18','A17','A16','A15','A14','A13','A12','A11','A10','A28','A27','A9','A8','A7','A6','A5','A4','A3','A2','A1','A0']; var ValidationActionNames = ['A30','A29','A28','A27'] var GlobalActionNames = ['A30','A29','A26','A25','A24','A23','A22','A21','A20','A19','A18','A17','A16','A15','A14','A13','A12','A11','A10','A28','A27','A9','A8','A7','A6','A5','A4','A3','A2','A1','A0']; var ListActionNames = { }; var Dependencies = { 'byh_associationMunicipality': { 'Dependencies': [Actions.A26,Actions.A25,Actions.A24,Actions.A22,Actions.A21,Actions.A20,Actions.A19,Actions.A18,Actions.A5,Actions.A4,Actions.A3,Actions.A1,Actions.A0] }, 'byh_association': { 'Dependencies': [Actions.A13,Actions.A12,Actions.A2] }, 'common_contactperson': { 'Dependencies': [Actions.A17,Actions.A16,Actions.A15,Actions.A14,Actions.A9,Actions.A8,Actions.A7,Actions.A6] }, 'byh_projectPlanning': { 'Dependencies': [Actions.A10,Actions.A28,Actions.A27] }, 'byh_projectMaterial': { 'Dependencies': [Actions.A10,Actions.A28,Actions.A27] }, 'byh_projectConstruction': { 'Dependencies': [Actions.A10,Actions.A28,Actions.A27] }, 'byh_freeArea': { 'Dependencies': [Actions.A29,Actions.A23] }, 'byh_projectTotal': { 'Dependencies': [Actions.A28,Actions.A27] }, 'common_declaration_correctInfo': { 'Dependencies': [Actions.A30] }, 'common_declaration_knowledge': { 'Dependencies': [Actions.A30] }, 'common_declaration_notStarted': { 'Dependencies': [Actions.A30] }, 'common_declaration_changedConditions': { 'Dependencies': [Actions.A30] }, 'byh_deminimis': { 'Dependencies': [Actions.A30] } }; var InlineValidations = { V_byh_grantAmountMore_validation : { Pages : [2], Property : '', ListName : '', ValidationFunction : function (recordArgs) { var tmp = (Actions.GetValueOrDefaultOf('byh_projectTotal', 'Decimal') <= 250000); return tmp; }, }, V_byh_grantAmountLess_validation : { Pages : [2], Property : '', ListName : '', ValidationFunction : function (recordArgs) { var tmp = (Actions.GetValueOrDefaultOf('byh_projectTotal', 'Decimal') >= 25000); return tmp; }, }, V_byh_freeArea_validation : { Pages : [2], Property : '', ListName : '', ValidationFunction : function (recordArgs) { var tmp = (Actions.GetValueOrDefaultOf('byh_freeArea', 'Enumeration') != 'yes'); return tmp; }, }, V_byh_declaration_validation : { Pages : [3], Property : '', ListName : '', ValidationFunction : function (recordArgs) { var tmp = ((((Actions.GetValueOrDefaultOf('common_declaration_correctInfo', 'Bool') && Actions.GetValueOrDefaultOf('common_declaration_knowledge', 'Bool')) && Actions.GetValueOrDefaultOf('common_declaration_notStarted', 'Bool')) && Actions.GetValueOrDefaultOf('common_declaration_changedConditions', 'Bool')) && Actions.GetValueOrDefaultOf('byh_deminimis', 'Bool')); return tmp; }, }}; var submitScriptData = { SaveUrl: '/SelfService/submission/save/byh_application', SaveUploadUrl: '/SelfService/submission/saveupload/byh_application', RemoveUploadUrl: '/SelfService/submission/removeupload/byh_application', NewRecordInputUrl: '/SelfService/submission/NewRecordInput/byh_application', WebActionUrl: '/SelfService/webaction/execute/byh_application', AutoCompleteUrl: '/SelfService/autocomplete/execute/byh_application', UICultureString: 'da-DK', LocaleString: 'da-DK', WeekNumberCulture: 'da-DK', LocaleDecimalSeparator: ',', LocaleThousandSeparator: '.', ClientValidationEnabled: true, ClientInlineValidationEnabled: false, IntFormat: { NumberOfDecimals: 0, FixedDecimals: true, ThousandGroupingEnabled: false }, DecimalFormat: { NumberOfDecimals: 2, FixedDecimals: true, ThousandGroupingEnabled: true }, DoubleFormat: { NumberOfDecimals: 4, FixedDecimals: false, ThousandGroupingEnabled: false }, MaxUploadSize: 5000, MapBoundaries: { North: '0', South: '0', East: '0', West: '0' }, ContactProperties: [ ] , SaveDraftDataInterval: 10000, ReplyKey: '', DatePicker: { MomentFormat: 'DD-MM-YYYY', JqueryFormat: 'dd-mm-yy', FirstDay: 1, IsRightToLeft: false, ShowMonthAfterYear: false, DatePickerImage: '/SelfService/Themes/v2/Images/svg-icons/insert-invitation.svg', } }