Skip to main content

i have created a dac from a table

but when i select from it using pxselect it dosent get any data but in the screen it shows the data normally

the searchinspection in the below picture is giving me the default data everytime i debugged it the inspection number is sent normally to the select but it dosent return any data from database.

 

this is my DAC Code


i solved it by clearing the cache


Thank you for sharing your solution with the community @abdallaahmed61 !


@abdallaahmed61 - I have to admit, I’m really confused by this code. What is the purpose of performing a BQL select against the same table to get the same record result?

inspectionForm.Current is going to contain the record currently displayed in your graph. But rather than use that record, the data view delegate for that view is going to duplicate itself into a new view where the current record is matching itself, and then return that record instead of the normal one.

You don’t need to use a data view delegate. That is simply a useful tool if you need to manipulate the data you want to return. In this case, I think you’d be better off without it.


@abdallaahmed61 - I have to admit, I’m really confused by this code. What is the purpose of performing a BQL select against the same table to get the same record result?

inspectionForm.Current is going to contain the record currently displayed in your graph. But rather than use that record, the data view delegate for that view is going to duplicate itself into a new view where the current record is matching itself, and then return that record instead of the normal one.

You don’t need to use a data view delegate. That is simply a useful tool if you need to manipulate the data you want to return. In this case, I think you’d be better off without it.

my code was getting me crazy by not working right 

thats why i played a bit with my code 

i know its not good way i was just trying to figure out why the code isnt working as i want

 


Understood, and for sure it takes a bit to understand how everything works. I'm simply suggesting that it may create issues farther down the road the way you are doing it, as you've already experienced. I think your best bet would be to remove the data view delegate and also possibly the searchInspection data view.


Understood, and for sure it takes a bit to understand how everything works. I'm simply suggesting that it may create issues farther down the road the way you are doing it, as you've already experienced. I think your best bet would be to remove the data view delegate and also possibly the searchInspection data view.

Yup i did that after i solved the main problem.

The main problem was i was using the same view in my tabs that was making the screen go crazy and make terrible things 😂


Reply