Normal Topic Can one Xpost into Naturally Linked Subform? (Read 1018 times)
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Can one Xpost into Naturally Linked Subform?
Apr 21st, 2007 at 6:21pm
Print Post Print Post  
Even if it is done,  I believe, xpost will not be able to create record and will not be able to do data manipulation by using programming. I believe mass-update will be able to do all that in naturally linked subform. But then it will not be seamless process like xpost.  Is there any way to update naturally linked subform seamlessly, meaning only by programming including creating new subform records whenever necessary?

All of the above while working with the different database but it can be in the same application.  Your feedback will be very much appreciated.
  
Back to top
 
IP Logged
 
proudpoppy
Full Member
Members
***
Offline


Do What ??

Posts: 420
Location: South Carolina
Joined: Apr 7th, 2004
Re: Can one Xpost into Naturally Linked Subform?
Reply #1 - Apr 22nd, 2007 at 3:06am
Print Post Print Post  
Yes you can !! My application does it all the time all my records are natural linked. ALL mine are in the same database. Wink Here is some code not pretty but it works.

If @Update and (Loc0 = 1) then
{
xpost(@Fn,Part number,"Mastinv!Item number",Qty0,"PHA1","Sub")
}
else if(Loc0 = 2)
{
xpost(@Fn,Part number,"Mastinv!Item number",Qty0,"PHA2","Sub")
}
else if(Loc0 = 3)
{
xpost(@Fn,Part number,"Mastinv!Item number",Qty0,"PHA3","Sub")
}
else if(Loc0 = 4)
{
xpost(@Fn,Part number,"Mastinv!Item number",Qty0,"Vict","Sub")
}
If Loc0 = 5
{
xpost(@Fn,Part number,"Mastinv!Item number",Qty0,"Shop","Sub")
}
Else
{
If (Loc0 >5) then Writeln("Didn't Work")
}
  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Can one Xpost into Naturally Linked Subform?
Reply #2 - Apr 22nd, 2007 at 6:59pm
Print Post Print Post  
Robert,

We can XPost to a natually linked subrecord, but I believe Bharat is wanting to create a natural subrecord from a different DB. How would you create a new natural subrecord (from outside of the parent form) with XPost, and get Sesame to know what parent to associate it with?
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Can one Xpost into Naturally Linked Subform?
Reply #3 - Apr 22nd, 2007 at 7:36pm
Print Post Print Post  
Version 1.x can create a natural sub using @FormCreateNewRecord, but only if you are on its parent at the time. Version 2 can use a new set of commands (XResultSet) to create and link natural subrecords from outside the database.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Can one Xpost into Naturally Linked Subform?
Reply #4 - Apr 22nd, 2007 at 9:33pm
Print Post Print Post  
Quote:
How would you create a new natural subrecord (from outside of the parent form) with XPost, and get Sesame to know what parent to associate it with?


Thanks Carl. You understood my question well and put it very nicely.  Xpost either replace or calculate new values but how would it create a naturally linked subrecords? With available commands and functions for creating new records in subform will only work with the open parent form. I do not think even Mass Update will be able to accomplish that either when it comes to naturally creating naturally linked subrecords.

It is indeed good to hear from Erika that such capabilities are available with new programming commands and functions in Sesame version 2.0.  I can hardly wait for version 2. Until then I will toil with some alternate methods with old designs. Thank you all.

  
Back to top
 
IP Logged
 
proudpoppy
Full Member
Members
***
Offline


Do What ??

Posts: 420
Location: South Carolina
Joined: Apr 7th, 2004
Re: Can one Xpost into Naturally Linked Subform?
Reply #5 - Apr 23rd, 2007 at 1:12pm
Print Post Print Post  
Quote:
Robert,

We can XPost to a natually linked subrecord, but I believe Bharat is wanting to create a natural subrecord from a different DB. How would you create a new natural subrecord (from outside of the parent form) with XPost, and get Sesame to know what parent to associate it with?


I guess that's what I get for trying to answer with 2-hrs sleep in the last 48  Smiley
  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Can one Xpost into Naturally Linked Subform?
Reply #6 - Apr 23rd, 2007 at 10:18pm
Print Post Print Post  
proudpoppy wrote on Apr 23rd, 2007 at 1:12pm:
I guess that's what I get for trying to answer with 2-hrs sleep in the last 48  Smiley

No problem, I've been there too.  Smiley
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged