{"action":"created","issue":{"url":"https://api.github.com/repos/volkanceylan/Serenity/issues/2351","repository_url":"https://api.github.com/repos/volkanceylan/Serenity","labels_url":"https://api.github.com/repos/volkanceylan/Serenity/issues/2351/labels{/name}","comments_url":"https://api.github.com/repos/volkanceylan/Serenity/issues/2351/comments","events_url":"https://api.github.com/repos/volkanceylan/Serenity/issues/2351/events","html_url":"https://github.com/volkanceylan/Serenity/issues/2351","id":232943358,"number":2351,"title":"Filling a textbox from dropdown","user":{"login":"ms4hafiz","id":20435849,"avatar_url":"https://avatars3.githubusercontent.com/u/20435849?v=3","gravatar_id":"","url":"https://api.github.com/users/ms4hafiz","html_url":"https://github.com/ms4hafiz","followers_url":"https://api.github.com/users/ms4hafiz/followers","following_url":"https://api.github.com/users/ms4hafiz/following{/other_user}","gists_url":"https://api.github.com/users/ms4hafiz/gists{/gist_id}","starred_url":"https://api.github.com/users/ms4hafiz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ms4hafiz/subscriptions","organizations_url":"https://api.github.com/users/ms4hafiz/orgs","repos_url":"https://api.github.com/users/ms4hafiz/repos","events_url":"https://api.github.com/users/ms4hafiz/events{/privacy}","received_events_url":"https://api.github.com/users/ms4hafiz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-06-01T16:52:05Z","updated_at":"2017-06-06T06:53:05Z","closed_at":null,"body":"Hi;\r\n\r\nI am trying to fill two textboxes DateFrom and DateTo after picking the value from a lookup. The DateFrom and DateTo exist in the lookup table but not in the table I want to enter. However, i want to just show them in the form.\r\n\r\nI have added the following code in xxDialog.ts:\r\n`        \r\nprotected form: PcmForm;\r\n\r\n        constructor() {\r\n            super();\r\n\r\n            this.form = new PcmForm(this.idPrefix);\r\n\r\n\r\n            this.form.RoundId.changeSelect2(e => {\r\n                var roudID = Q.toId(this.form.RoundId.value);\r\n                if (roudID != null) {\r\n                    this.form.DateFrom.value = PremiumSamples.Lookup.RoundRow.getLookup().itemById[roudID].DateFrom;\r\n                    this.form.DateTo.value = PremiumSamples.Lookup.RoundRow.getLookup().itemById[roudID].DateTo;\r\n\r\n                }\r\n            });\r\n        }`\r\nand also added the DateFrom and DateTo variables in the xxForm.ts and have specified as Serenity.DateEditor\r\n\r\n`        DateFrom: Serenity.DateEditor;\r\n        DateTo: Serenity.DateEditor;`\r\n\r\nand ` ['DateFrom', () => Serenity.DateEditor], ['DateTo', () => Serenity.DateEditor]`\r\n\r\nBut when I run this, it gives the following script error:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/20435849/26690209/b2b995fc-470d-11e7-84fa-294b354cac36.png)\r\n\r\nAm I missing anything?\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/volkanceylan/Serenity/issues/comments/306398420","html_url":"https://github.com/volkanceylan/Serenity/issues/2351#issuecomment-306398420","issue_url":"https://api.github.com/repos/volkanceylan/Serenity/issues/2351","id":306398420,"user":{"login":"Estrusco","id":16304015,"avatar_url":"https://avatars3.githubusercontent.com/u/16304015?v=3","gravatar_id":"","url":"https://api.github.com/users/Estrusco","html_url":"https://github.com/Estrusco","followers_url":"https://api.github.com/users/Estrusco/followers","following_url":"https://api.github.com/users/Estrusco/following{/other_user}","gists_url":"https://api.github.com/users/Estrusco/gists{/gist_id}","starred_url":"https://api.github.com/users/Estrusco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Estrusco/subscriptions","organizations_url":"https://api.github.com/users/Estrusco/orgs","repos_url":"https://api.github.com/users/Estrusco/repos","events_url":"https://api.github.com/users/Estrusco/events{/privacy}","received_events_url":"https://api.github.com/users/Estrusco/received_events","type":"User","site_admin":false},"created_at":"2017-06-06T06:53:05Z","updated_at":"2017-06-06T06:53:05Z","body":"Q.isValue is this:\r\n\r\n```ts\r\nss.isValue = function ss$isValue(o) {\r\n\treturn (o !== null) && (o !== undefined);\r\n};\r\n```\r\n\r\nif you have to test if roundId is different from null and undefined you can use it.\r\n\r\nQ.isEmptyOrNull is for string\r\n\r\n```ts\r\nfunction isEmptyOrNull(s) {\r\n        return s == null || s.length === 0;\r\n    }\r\n```\r\n"}}
{"actor":{"display_login":"Estrusco"}}