August 6, 2017 at 1:32 am #1315
I need a field where I can enter structured text. An example may help to understand what I mean by structured text. If I want to have a text field where a patient’s diseases are entered, I would want it be entered as text, but the text should have a specific structure /order, say the primary diagnosis (for which I will use a ChooseList to avoid spelling mistakes that may happen if free text is allowed), followed by the date of diagnosis and then the details. I could use different fields for each component, but then, how can I enter multiple diagnoses? I could use a separate details table. But, a master details relationship for information that is actually used only as a single field, where the splitting up is just to structure the text, doesn’t appeal to me. RepeatControl was the best option that I could find. But, it could not be used as a control for a Field definition. So, I tried to make a ChooseField that would bring up RepeatControl. The ChooseRepeatControl and RepeatDialog I made are attached. They are working as far as I can see.
From the code will you please tell me
1) If I have missed anything that should be taken care while making a control of this kind.
2) Are there any other Suneido control that I could have used? I did see InfoControl, but it allows only two fields and doesn’t allow adding more than one set of text)
3) How should I proceed to be able to use a function to validate each record of the RepeatControl?
4. The Repeat Dialog doesn’t resize to accommodate adding or deleting rows. What did I miss?
Attachments:You must be logged in to view attached files.August 6, 2017 at 12:29 pm #1318
I can see the field could very long, and hard to read with different separators
You could use create a control to inherit from RepeatControl, and use it in the field definition, then the field can be used on the screen directly, and saved as object
And it expands/shrinks automatically on the screen
For validation, you could override Valid? method to add your own validationAugust 9, 2017 at 5:11 am #1322
Thanks for your reply. I am not sure if I understand your suggestion. I think you are suggesting to not bring up the Repeat control as a dialog, but use a modification of it as a field definition. If so, I will explore that too.
You must be logged in to reply to this topic.