Forum Discussion
Hi,
I am not sure if this one is what you are looking for. But you can use a "Nested Form" to display content from one ItemType into the Form of another ItemType. Nested Form is one of the field types you can select in the Form editor.
https://community.aras.com/f/community/3193/how-we-use-nested-forms
https://community.aras.com/f/development/3477/how-to-change-size-of-nested-form
- harvey_str6 years agoIdeator II
Thanks Angelalp for you answer.
But I already thought about nested forms and they don't match what I'm looking for ...
More simply, I want to extract data from one or more Item from an ItemType (in my case, "exam") with the id of the Item I want. Then I want to display it in a HTML table in my "student_info" Form..
The id is integrated in the form of "String" in my Form "student_info" but is not visible. Every "student_info" Forms have different "id" displayed as "String" so I should have as much data from "exam" in my table.
I wish you can understand what I'm looking for.
Thanks
- angela6 years agoCatalyst II
Hi Harvey,
ah okay. I still do not fully understand your use case, but I see that nested forms are not the right solution for you.
As far as I understand, you are already able to display content in your html element. So your onLoad Method basically works? But why do you want to connect with ids?
Do you have a property in your "Exam" ItemType that contains the linked student? You could than make a simple get query with a filter for the student name and render the table in the html with the onLoad method.
var exam = inn.newItem("Exam","get");
exam .setProperty("student_name", "Kojak");
exam .setAttribute("select","exam_name, result");
exam = exam .apply();
for (var i = 0; i < exam .getItemCount(); i++)
{
// build table in html element
}- harvey_str6 years agoIdeator II
Hi Angela
Thanks to show some interest for my case. And sorry for my late answer.
[quote userid="4412" url="~/f/development/9071/how-to-display-automatically-properties-from-an-itemtype-in-a-form-from-another-itemtype-thanks-to-an-id/4355"]So your onLoad Method basically works?Yes, the method works fine. But it only works when, on the view form, I go on Tab RelationShip and add the relationship manually. I've create a relationship between "student_info" and "exam" Itemtype. Actually this is the only solution i've found to display the "exam" properties in the "student_info" Form.
[quote userid="4412" url="~/f/development/9071/how-to-display-automatically-properties-from-an-itemtype-in-a-form-from-another-itemtype-thanks-to-an-id/4355"]But why do you want to connect with ids?I want to automate what I explained above.. This is why i want to use id's. In my "student_info" Form, i've Text Field Type. In these Text Field, I have the id of the "exam" ItemType. I don't need to fiil each Text Field because their content come from an imported excel file.
In other words, I'm searching for an automatic way to search through all Items from an ItemType, the Item which has the same id of the content of a Text Field in a Form. Then, when this Item is selected, I want to display it in this same form.
I hope you can understand my needs now.