ID accessible from valuelist field?
4 posts
• Page 1 of 1
ID accessible from valuelist field?I use __sql__ = "select partID, Part from parts" as a valuelist. I choose from the list in the field PART. Can I now access and use the partID of the selected Part to use as a pointer to another field in that record that I wish to update? I will use a before save action.
Re: ID accessible from valuelist field?Kedikatt,
Please clarify your question. Jean
Re: ID accessible from valuelist field?What I am wondering is, noticing that the sql to load the valuelist includes partID as an argument. Is partID also available to use, in for instance $record->val('partID')? Or is only the Part value returned as useable?
I have to ask instead of test it because I am not familiar enough with this application to easily write and test code to see if it is viable. Maybe it is not possible, maybe I would mess up the code, use the wrong functions, so I would not know if I could do it or not. I think I have cobbled some code together to use it, if it is accessible.
Re: ID accessible from valuelist field?Well, in fact in your list the id (partID) is the value and the value (partValue) is what is displayed in the list.
So the id is what is inserted into the database. Hope this helps Jean
4 posts
• Page 1 of 1
Who is onlineUsers browsing this forum: No registered users and 22 guests |