Optional lookup for System Setting  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Optional lookup for System Setting

Postby pricerc » Wed May 04, 2022 4:42 pm

I'm adding a C/C surcharge function to my Stripe plugin.

I'm adding a setting for Stocked vs. Non-stocked for the surcharge item.

And another setting for the part number. (And probably another for the description.)

If they choose "stocked", I'd like the part number field to be a lookup. If they choose "non-stocked", then it should be a plain text field. In either case, I plan to store the part number (not the inventory ID).

And it should always work like the PartNo field in sales order maintenance, where you can type a part number and it will validate it when you {tab} away.

I'm figuring that I'm best to make the field a text rather than lookup field, and then if necessary, replace the editor in the FormatCell function of SystemSettings class in my plugin.

Any pointers ?
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 504
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 20

Re: Optional lookup for System Setting  Topic is solved

Postby SBarnes » Wed May 04, 2022 5:09 pm

Why wouldn't you just make it a lookup field and just unlock cell beside the button if necessary and capture the text change by attaching a change event to the grid or if you want to make it simple and go around the problem based on the other setting when the button is pressed either show a Jiwa search screen or the standard windows input box to get the text from the user?
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1619
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Optional lookup for System Setting

Postby pricerc » Wed May 04, 2022 5:45 pm

SBarnes wrote:Why wouldn't you just make it a lookup field and just unlock cell beside the button if necessary and capture the text change by attaching a change event to the grid or if you want to make it simple and go around the problem based on the other setting when the button is pressed either show a Jiwa search screen or the standard windows input box to get the text from the user?


I guess I'm expecting the default/common case to be that it's a non-stock item being used, so I'm thinking about it from that angle.
/Ryan

ERP Consultant,
Advanced ERP Limited, NZ
https://aerp.co.nz
User avatar
pricerc
Senpai
Senpai
 
Posts: 504
Joined: Mon Aug 10, 2009 12:22 pm
Location: Auckland, NZ
Topics Solved: 20


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 15 guests