Adding links to records in the child table on the form using a script.
Hello! I can't figure it out: I use a script to create new records in a child table, but they don't appear in the child table displayed on the form. Please help me find a discussion of this issue! Thanks.
14 replies
-
Folow this example and adapt to your script :
let me:= this;
let i := create ChildTable;
i.(ParentTable := me)
Steven
-
Thank you so much for your help. I 'm going to try it now . I will definitely write the result.
-
Thank you, Steven. Everything works! But what if the record is not created, but selected from the table? How do I add a link to an existing record so that it appears on the form in a child table?
-
Are you talking about a record in the child table?
If you have created a record in the child table first, then you should see the parent table field and from there be able to select which record from the parent table you want to link it to.
-
I tried to solve my question using the child table, but it didn't work out.
I'm trying to solve the issue with filters, but it's not working yet either ...
Please help me sort it all out!1. There are tables "Vacancy" and "Candidate".
2. "Vacancy" is linked to "Candidate" as 1 record in "Vacancy" : N records in "Candidate".
3. For a better display, 2 more links have been created on the "Vacancy" form (tables: "Candidate1", "Candidate2") with "Candidate", in which different filters are applied.
4. How to use the button to automatically add links to "Candidate1" and "Candidate2" from "Candidate"? -
I'm a bit unsure what you want to happen. Maybe if you explain the work flow you want to happen we can help figure out ways to do it.
-
Hello everyone!
I have 1,000 candidates. 100 candidates belong to 1 vacancy (N: 1 link created). Each candidate has 2 test steps. It is necessary that the form displays the 1st table - with all candidates, the 2nd table - is displayed with candidates and results of the 1st stage, the 3rd table - is displayed with candidates and results of the 2nd stage. I planned to display a table with 100 candidates on the form 3 times and in 2 apply filters with 1st and 2nd stages.
How to make it necessary to manually fill out only the 1st table, and the 2nd and 3rd automatically with a script?This is a simplified display.
-
I can't believe no one has any ideas!
-
Having more than one relationship between two tables can be a useful thing, for example a customer may have more than one contact associated with it, but one main contact and to have two relationships here would be a flexible solution for this. In your case though you will end up with three relationships all with the same links, so this may not be the best solution. I would reccommend using your one relationship together with two views. They would both refer to the relationship but scoped differently by using a filter condition inside square brakets.
For your first view use something like this code
Candidate[Status = 1]
For your second view use something like this code
Candidate[Status = 2]
Regards John
-
John, Thank you for your help.
I just started studying Ninox. I don't understand - how to add 1 view links, get these links in 2 view without manual addition?
-
A view is not a link, its an element you can add to your form. It takes a formula which returns a set of records. These can be related to the table the view is on, or unrelated tables (using the select statement).
If you just put in a formula of Candidate it will mirror exactly your relationship. If you scope this with Candidate[Status=1] it will only show candidates where Status is 1.
Regards John
-
Thank you, John! Now I will try and after I will definitely write. Anyway, thanks for the explanation.
-
Yes, John! It works. I'm getting a better understanding!
-
Well done. Come back anytime you have a query.
Content aside
- 3 yrs agoLast active
- 14Replies
- 752Views