Hi all,
I have a small -hope so- customization to make in the Calculate/approve form trans grid.
The JobId field/column has a lookup field that probably get filter depending on the JmgStampJournalTrans.JobRefype.
I want to modify the LookUp field on the JobId to add two more columns (when jobRefType is of type Process:
1.The ProdRoute.OprId (shouldn't be that complicated)
2. the CostCategoryId ( which has a custom table references that links a subset of Shared CostCategoriesId with a specific OprId)
the Idea: instead of selecting the Job Id, the costCategoryId. This because instead of stamp in a secuencial id (jobId) the worker have a predefined list of static codes (CostCategoriesId).
The issue: I don't know where to find the LoopUp method for the JobId :/ . where is that exactly built?
As always your Help is greatly appreciated
thanks a lot beforehand.
1. I used the LostFocus() on the forms grid field. that does the job for now. ( by Now I want this to work on this form only).
I will use the write/insert when everything is tested. thanks for the info!
2. Directly from the table field property. haha you have a way to explain sometimes that got me thinking
Thanks for help!!
I will close this thread as solved.
thanks for your time Man!
1. The methods you will use change according to the work you want to do.
You can use the Write method, but if you want it to work the same way in more than one form, you can turn to table methods. Or if you want your code to work in the operations on the table, you can write directly to the insert/update methods.
2. Use field name at table ; filedNum(Table,CostCategory)
Hi Ergün,
you were right I was so focus on the JmgJobLookup that I did not catch that line element.selectMode(); thanks very much!
now is selecting properly :). I am almost there to finish!
1. I have override the Modified() method on my custom grid Field to write the related JobId from Code (this works but..). The problem is that is only working when is "modified". how can I do to change it every time the User inserts in the custom field the first time and/or modifies it?
2. How can I do to make the custom field to be Editable after is inserted to the table. I see that once is written on the table I cannot change it. but the rest of the fields are easily changeable, for example: the JobId.
3. The alternate Row color did not Show because the Datasource AllowEdit/Create/Delete were Set to Yes. I change it to No and no it looks good (Fixed)
In fact, if you follow the link I shared exactly, you will reach the result more easily.
However, I think you made a mistake on one of two points.
public void init() { super(); // Returns selected value from form control element.selectMode(Dinosaurs_DinosaurName); }
Or
public void lookup() { // Overrides a lookup method to utilize the default lookup form FormRun lookup; Args args = new Args(formStr(DefaultLookup)); args.parm(""); args.caller(this); lookup = classFactory.formRunClass(args); lookup.init(); this.performFormLookup(lookup); }
I don't quite understand the color issue. It will be clearer if you post a picture. However, its a lookup don't expect it to open like a form.
Hi Ergün,
Thanks for replaying.
I am trying to implement the same logic as per JmgJobLookup form. I managed to get callers' record from the Approval form and I managed to filter the custom lookup when process+prodid is selected. Now I have some issues.
1. when I select any value from the lookup, it does not write anything to the line field of the grid, the lookup just closes and nothing happens. Do I have to override any method for that?
2. about the Color rows, I mean that this lookup form's grid opens completely in white. there is no <blue/white/blue> background alternating row color on the grid.
I did not fully understand. You are writing a custom lookup (not a form) and you want to show fields from more than one table(?).
You can use SysMultiTableLoookup for this, but remember, it's not a standard class. I shared the link below
kashperuk.blogspot.com/.../sysmultitableloookup-dynamic-lookups.html
so I think the answer is no :(.
Since I almost guessed that. I started making the custom. There is something annoying that I don't get it.
why The color rows are not shown?
You can create a custom lookup form and add it to EDT (like JmgJobIdLookup)
Hi Ergün,
Perfect! you are a genius! did not know they were so many kinds of lookups (: .
I have been researching further and debugging the JmgJobIdLookUp form on how it gets auto filtered depending on the selected record (quite interesting by the way).
So my Idea -not sure if the best- is actually modifying my costCategory lookup to also get filtered depending on the related ProdId (reference Column) and at the same time after the costCategory is selected by user, the JobIdentification (jobId lookup) will be automatically assigned (this last thing I am not sure how to do it).
Here my first doubt: since my lookup comes from the table' AutoLoopup field group. Is it possible to create a method to filter that AutolookUp?. Or I have to create separate form Lookup and then filter it using the dataSource.
I want this lookup to work accross the system with low maintenance. Overriding methods on each form a don't think is a good idea.
as always greatly appreciated
If you can't see lookup on the form, you have to look at the table first. Then to the relevant EDT. Two points on EDT are important.
First one has table relation in old edts
in cases where the EDT is linked with the table, you should look at the following values of the relevant table
Secondly, you need to look at the following property on the EDT
There are more complex lookups but in general this info will do
André Arnaud de Cal...
291,969
Super User 2025 Season 1
Martin Dráb
230,842
Most Valuable Professional
nmaenpaa
101,156