8/18/2025 8:27:47 AM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
|
|
|
|
Data-Form with 1:n-relation
Posted: 12 Dec 07 2:18 AM
|
hi, i'm having a data form with controls connected to a db-table (primarytable:field). onOK saves the data to the database - works fine.
to the main table connected there is a 1:n (1:4 in detail) relation to another table.
my question is: can i use SLX-databinding via control to submit the data to these 4 entries of secondary table? my problem is: i tried to connect e.g. the control "name", which is a column of sec. table, to primary table (primarytable:id=id.secondarytable!name). but i think this only works for 1:1 relations, right? if there are 4 controls each connected with same relation, how can SLX know which relation is which?
is there a solution for this problem? is using a datagrid for 2nd table the only solution?
thanks! |
|
|
|
Re: Data-Form with 1:n-relation
Posted: 12 Dec 07 9:11 AM
|
You could use vb script and manually populate and save the contents of the fields. That's probably the best solution.
If you're not familiar with vbscripting, and you absolutely cannot use a datagrid, then the bad workaround solution is to create a 1 to 1 table with fields named like 'field_a_1, field_b_1, field_a_2, field_b_2, field_a_3, field_b_3, etc.'
|
|
|
|
Re: Data-Form with 1:n-relation
Posted: 12 Dec 07 9:25 AM
|
hi, yes i could script-it-out in vbscript, but i dont like this (i am just re-writing a form with 9000+ lines of code where every(!) db-access was hardcoded... now i changed it to slx-methods (controls linked to db-field), now we have less than 1000 lines of code. so you see why i want to avoid this... 
maybe i should use a datagrid... |
|
|
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|