question

kryczka_17 avatar image
0 Likes"
kryczka_17 asked Jason Lightfoot commented

customcode dashboard button (warehousing)

How to write in the code dashboard button , so that when I assign the column "Kategoria" in the table "BazaDanych" it automatically assigns me the article code that is column "Kodartykulu" from the table "daneflexsim" and if there are not enough article codes it prints "0"?


magazynowanie.fsm


FlexSim 20.2.3
warehousingcustomcodedashboard button
magazynowanie.fsm (61.3 KiB)
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jason Lightfoot avatar image Jason Lightfoot ♦♦ commented ·

Hi @kryczka_17, was Felix Möhlmann's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·

1 Answer

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered

You could use SQL to find all article numbers that belong to a category. If you do this for all possible categories, you can then loop through the "BazaDanych" table and assign entries based on the category. (Check which category the row belongs to and check if there are still entries for that category. If yes, assign the first available value and remove it from the available ones. If not, assign 0 instead.)

5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.