Questions

Hello, I’m trying to use smartclient with PHP, and have some questions:

  1. When I perform addData, I would like to specify a callback function (or other solution) to check if the insert was done or not and take some actions depending on the response, and what format the response has to be?.

  2. I am working with DynamicForm and RestDataSource, In some cases, I need to use Foreign keys in some forms, for example: I have an users table, and need to store the user on each sale transaction, so I need my form to be able to fetch users data from users table and store it on sales table…Do I explain myself?..its similar to showcase application’s detail viewer, where you have a category combo, wich is fetch from one datasource (category) and updated into another (item)

thanks in advance…

Hi oscquin,

  1. addData() and other functions that trigger DSRequests allow a callback parameter.

  2. this example is very close to your usage - it shows a form using another DataSource to provide options for a select or combobox, and saving one of the fields from the related DataSource as the value of a field in the form.

Thanks

Thank you very much for your reply, I can see there is option for callback, but how can I tell this callback function if my transaction succeded or failed?

thanks again,

See the reply to your question in this other thread.