popupRecord for child record via button
Dear Support-Community
I'm new at using Ninox and I try to figure out some things.
I want tho give the user the possibility to go directly to a child record with a button.
I got only one parent table with a related child table in my database structure.
On parent table form the user (who should'nt have access to the related child table via an embedded view or an 1:N relation field) should chose in a DCF the related record from the child table which she/he wants to edit and then hit a button "edit" to jump right to this record. (Editing this chosen one only)
I thought it would be the script for the "on click" line at the button like this:
1 let RecID := number('DCF');
2 let myRec := item('child table', RecID);
3 popupRecord(myRec, "tabname in child table")
but nothing happens at all.
I'm using the web app.
Did I missed something?
Thanks a lot for a little hint.
Carsten
9 replies
-
What do you mean by going directly to a child record? AFAIK that is out of the box possible as a popover opens. Like here when I click on a Project. I do see the child in there.
-
Carsten
I think you are referring to this (or similar)
in my example
I have the master table (JobDocket)
I then have child tables for Quotes (and even other jobdockets but lets ignore this)
as you can see on the screenshot there is a quote field with a number in it and a > button with the script in it.
click the button and it opens that record directly.
so click button and open record 7121 in quotes
script in the button is
let xCopy := 'Quote Ref';
let i := first(select Quotes where QteNum = xCopy);
popupRecord(i)This is only one solution that suits me as you have got the get thr ref of the child record.
but you should be able to bend this do the same from a Drop down etc
-
you will also see a at the top off the first form a tick box called show quotes. I have this set to show all related quote that meet a criteria - ie show quote but only those that are not marked as hidden and do not show cost margin fields etc
so there are several way you could achieve what you wante
-
That is weird. It works for me. I am on the MacOS app, but that shouldn't matter.
let selDC := number(dMCTable2); let iDC := item(Table22, selDC); popupRecord(iDC, "Tab")
Have you tried without the tabname and just popup the record?
-
Thanks to all. Now it works.
Content aside
- Status Answered
- 2 yrs agoLast active
- 9Replies
- 185Views
-
4
Following