Please refer to Mainpage\JobTestDetail4onchange
I have company entity which is fillied with the company group. I want the selection of company group is based on the "company"
- I have added the dropdown on change in company field, and the value of company group can be changed on screen. However, when i saved the record. Company and Company group field are blank.
Would please help check my logic in dropdown change or anything should be added to assign the on change value to that 2 fields. Thanks so much.
E.g.
1. Test limited belong to Company Group FSK
2. In JobTestDetail4onchange , I created one Job with company "Test Limited".-->Company Group is changed based on the onchange action
3. When I click "Save" -->Both Company and company group seems resume to the full list and they are blank in database
In this case, I would like to know how I can assign the on change value to Company and Company group field? Kindly advise.
Hi again,
That is because in detail you should have other variable assigned to your dropdowns, it should be the one coming from the aggregate instead of companyId and companyGroupId.
You don't actually need those local variables for anything from what I'm seeing.
Also that way you don't even need to make those assigns to that CompanyId and CompanyGroupId in your save action, as the values you select in dropdown are already being stored in the proper attribute of the record you are about to create!
Just try delete thoses companyId and CompanyGroupId and replace them by the GetJobMaintenance2ById corresponding attributes.
Let me know if that helps,
Paulo
Hi,I checked your .oml briefly and I see your assign before the CreateOrUpdate in the save action is inverted. The variables bound to your Company and CompanyGroup dropdowns are CompanyId and CompanyGroupId, so they are the ones that hold the values currently selected.
You are creating a JobMaintenance Record, so you need invert those assigns to this:GetJobMaintenanceById2.List.Current.JobMaintenance2.Company2Id = CompanyId
GetJobMaintenanceById2.List.Current.JobMaintenance2.CompanyGroupId = CompanyGroupId
You want the attributes of the GetJobMaintenace record that you are about to create to hold the values, not the other way around!
Let me know if you need further help!
Cheers,
Hi Paulo,
After i inverted that two assignment, the record can be updated in database, but I face another display problem.
- Saved succesfully with Test Limited in company and FSK in company group
- When I click inside the detail, the display of company and company group are auto returned to the top of the value and show full list .-->Can both values hold on "Test Limited" and "FSK" in display ? Thanks.
Oh yes, you are right. I think too much. Thanks for your help!!!
Would you mind you help check another dropdown tag change which is based on same entity, and seems i cant work on it.
Input of Phase will make change of Level and Lastphase on dropdown - Level (it works)
-Last phase (doesn't work and it refers to the same entity of phase)
E.g. last phase of 102 is 101
In the page of JobTestDetail4Onchange PopUp, I want the level and last phase will be changed based on the above table. And Level is workable on my side and would you please help check on change of "Last Phase"
My existing result is:- Last phase of 102 still shows 102 but not 101 (Reference from first pic)
Kindly advise
Hi,
Please check below i am attaching your OML
Hope this will work
Thanks
Ruchi