Jump to content

Willkommen im Coresystems Community Forum

Dieses Forum wird nicht mehr weiter betrieben.
Sollten Sie eine Lösung für eine spezifische Aufgabenstellung suchen wenden Sie sich bitte an unseren Support: helpdesk.coresystems.ch.
Für allgemeine Produktinformationen kontaktieren Sie unser Sales-Team: sales@coresystems.ch

Welcome at the coresystems community forum

This forum is no longer being maintained.
If you need a specific solution please contact our support: helpdesk.coresystems.ch.
For general product information do not hesitate to contact our sales team: sales@coresystems.ch

- - - - -

Copy Field from One Form to Another

  • Please log in to reply
1 reply to this topic

#1 ApolloC



  • Members
  • PipPip
  • 12 posts

Posted 3 July 2014 - 17:28

I understand how to use the GetData and SetData commands in an EasyFunction to copy data from one field to another field on the same form, but how do I get data from another form?  What I'm looking to do is copy ORDR.DocDueDate to ODLN.DocDueDate.  I have a SQL query that can find the value that I need but if there is a similar function to Get/Set Data available I think I would prefer to go that route.  The process is that the user selects the Copy To --> Delivery from within the sales order, but in order for the rule to be fool proof should probably allow for using the Copy From --> Sales Order on the delivery.  Thanks in advance for the help.


EDIT: I think I'm on the right track in using SQLQuery to write the value to the dictionary and then SetData to write it to the ODLN.DocDueDate field, but I'm getting an error on the field I'm using to join my tables in the query.  The query works fine by itself, but within the rule, gets this error...


     Error in EasyFunction rule: "[rule name]"


     Error in command "SQLQuery": Conversion failed when converting the nvarchar value 'x' to data type int.


x = the value in my join in the SQL query.


When I perform the rule on the suspect order, I get a different error message...


     Error in EasyFunction rule: "[rule name]"


     Error in command "SQLQuery": Invalid column name 'x'.


x = the value in my join in the SQL query.

#2 Anders Olsson

Anders Olsson

    Advanced Member

  • Moderators
  • 223 posts

Posted 4 July 2014 - 10:06



The function CopyPaste is used to copy data from the previously active form to the current form.


Regarding the query: From the error message it would seem that you are trying to join and integer column on an nvarchar column.

Does it run in the SQL Management Studio? To be able to help you further with this could you please post your query, or better, the whole rule (.cocu file)?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users