NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Edvard on February 09, 2008, 06:17:43 AM
-
I have a file called activities
It has a many to many relationship to a file called children
As it is a many:many reæationship, I have made a file called chiildren_activities with 3 fields:
ID
ID from file Children
ID from file activities.
I have made a browse with the activities.
What I want is:
If there is no record with present child and activity - make such a record.
Update an Icon in the activity browse
If there is a record - be able to delete it, and again update the icon field
I just even cannot get started... ???
Edvard Korsbæk
-
The answer to this is buried in the question:
"How would you do this with a normal browse & form?"
There are a number of approaches you can take - but obviously you should approach it the same way that you would do this in a Windows program.
In essence the mechanism would be the same - you just need to think very carefully about what file the browse is browsing, and on which file the form is.
Plus the embed point "Validate Record" (which happens when the save is pressed) is probably also gonna come in very handy.
Cheers
Bruce
-
In a standard browse/form, I would use a brwn.updatebuffer() to find the record, prime the form as described in 'Programming in Clarion ABC' and make a form with the id of the fiile as parameter.
Point is, that I do not know the nettalk equialent of the UpdateBuffer :-\- Parameter passing is via session variables ;D.
And the good old embed points 'Accepted' and s'selected' could too be good to have an equialent of...
Best regards
Edvard
-
Hi Edvard,
Forgive me, but I'm still not 100% sure of exactly what you are trying to do. However some hints...
See FAQ, specifically number W4. This covers calling a form directly "without a browse". I'm not sure if it applies.
Regarding "which record has been highlighted". If the Browse is a Form field (on a form) then you can add some "server side code" just as you can with any form field. This code will get triggered with each selection on the browse. At this point the "unique identifier" for the browse is updated in the session Queue. In this sense this is the same as a Window Event:NewSelection.
Cheers
Bruce