Skip to main content
Solved

universal gui - Scheduler - drag drop fails

  • February 10, 2022
  • 4 replies
  • 151 views

Blommetje
Forum|alt.badge.img+13

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! 

Best answer by Anne Buit

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

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

4 replies

Anne Buit
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • 639 replies
  • February 10, 2022

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?


Blommetje
Forum|alt.badge.img+13
  • Author
  • Partner
  • 209 replies
  • February 11, 2022

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?
 


Anne Buit
Community Manager
Forum|alt.badge.img+5
  • Community Manager
  • 639 replies
  • Answer
  • February 11, 2022

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


Blommetje
Forum|alt.badge.img+13
  • Author
  • Partner
  • 209 replies
  • February 11, 2022

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! 
 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings