Solved

universal gui - Scheduler - drag drop fails

  • 10 February 2022
  • 4 replies
  • 122 views

Userlevel 5
Badge +12

Hi, 

I have a Universal gui with a Scheduler. This works ok, shows all rows correctly, based on a view. 
I also created an Instead_of_update trigger that should open a message box. 
The view is filled with a union on three queries; sick leave, holiday leave, and scheduled Activities. 
With 3 prefilters I can toggles these. This works well. 
 

I want this trigger to catch the PK, and update the related tables (not the view). 

 

So, no popup, and when I drag an element I get: 
Request error. The object was not found. You may have insufficient rights or the object no longer exists.
 

in the Dev-tools I get: 
POST https://--------------.com/indicium/iam/42/vw_planner(calculated_start=2022-02-16T00%3A00%3A00.000Z,calculated_end=2022-02-17T01%3A00%3A00.000Z,display_name='holiday')/stage_edit 404

and [Violation] 'load' handler took 152ms

Any thoughts on where to begin to get his debugged? 
If the error is gone, I assume the message will appear - since the _update now isn’t executed. 

thnx! 

icon

Best answer by Anne Buit 11 February 2022, 13:09

View original

This topic has been closed for comments

4 replies

Userlevel 7
Badge +5

Somehow, the selected activity could not be found. I cannot be certain what the cause is, but can you try change the primary key not to include the dates?

Userlevel 5
Badge +12

I did this, set the PK to the Leave_id and job_id. 
When I now drag, I get a 400 Bad_Request in the gui. 
The dev tools shows: 

 https://----.com/indicium/iam/43/vw_planner(job_id=null,leave_id=6)/stage_edit 400
And a whole bunch of: 



job_id = null, is correct, because I now only show leaves in the scheduler. 

leave_id is also correct, and unique within the table & view. 
Also, I do not get a popup based on my trigger ;
 

declare @leave_id int 
select @leave_id = leave_id from inserted
exec dbo.tsf_send_message '',@leave_id,0


Any other things that might be worth trying?
 

Userlevel 7
Badge +5

A nullable primary key is not supported - job_id = null should not occur. Can you omit job_id from the primary key without problems?

Userlevel 5
Badge +12

Yes, think I got it working! 
Now some tweaking and such, creating the view a bit better, but drag/drop and updating of the records does work! 

Thnx!