Newbies Gismo1233 Posted February 28 Newbies Share Posted February 28 Hi all, Please could you assist? When I create a new part number in orders layout, the part must be created in the parts table only if the part number does not exist My script goes into an endless loop and does not add the part Link to comment Share on other sites More sharing options...
comment Posted February 28 Share Posted February 28 Didn't you post this on Claris Community? Anyway, I either don't understand your description or your script, because I don't see the connection between the two. And of course your script will go into infinite loop: You have no Exit Loop If step and you have turned off the Exit after last option on the Go to Record step. Going back to your description: I would expected a user would either select from parts that already exist, or click [New...] to create one. Then, if you want to make sure the part they are trying to create does not already exist, I would suggest you use either a find or a relationship. Or, if you have a value list of the existing parts, you could use the FilterValues() function to see if the entered item is in that list. None of these require a loop. But perhaps you are doing something different. As I said, I did not understand your description and I don't see where you are in the workflow. Link to comment Share on other sites More sharing options...
Newbies Gismo1233 Posted February 28 Author Newbies Share Posted February 28 Hi, Yes it is the same question as on Claris community, for some reason, that website has been blocked in this country and I could not read the replies, the joy of traveling 🙂. FM Forum I could access so I reposted my issue Yes in the orders layout, the user can select a part number from the parts file, if the part does not exist, it can be entered manually. If a part was entered manually, I want that part to be added to the parts file. Link to comment Share on other sites More sharing options...
comment Posted February 28 Share Posted February 28 8 minutes ago, Gismo1233 said: it is the same question as on Claris community ... and I could not read the replies That's not what I see: you posted there only a day ago. 10 minutes ago, Gismo1233 said: in the orders layout, the user can select a part number from the parts file, if the part does not exist, it can be entered manually That's still too vague. Can be entered manually where? In the same field where they select an existing part? What would then be the trigger for the script? I also see that you have variables for PartNumber and for PartDescription. Where would the description come from? The entire workflow is not clear. Surely they would not be entering a description of an existing part? So if they know that they are entering a new part, why is it necessary to check? And why would the order details table even have a field for part description, instead of showing the description from the Parts table? Link to comment Share on other sites More sharing options...
Newbies Gismo1233 Posted March 1 Author Newbies Share Posted March 1 I have a list of parts in the parts catalogue with part description In the order layout, you select the part number from a drop down and will autofill the description If the part does not exist in the catalogue, the part number and description can be entered manually in the orders layout The newly enter part number and description must then be updated to the parts catalogue. No, if the part exist in the catalogue, no description will be entered if the part was selected from the drop down Yes I posted a few days ago, there are riots here and they tend to just cut off the internet and cellphone towers, I could not access Claris community at all over the past few days. Link to comment Share on other sites More sharing options...
comment Posted March 1 Share Posted March 1 49 minutes ago, Gismo1233 said: If the part does not exist in the catalogue, the part number and description can be entered manually in the orders layout I don't think that answers any of my questions. Anyway, I already gave you 3 alternative ways to find out if a part already exists, and I think I will leave it at that. Link to comment Share on other sites More sharing options...
bcooney Posted March 2 Share Posted March 2 Do you know how to build a picker? I believe that is what you need. This may help. https://www.proofgeist.com/blog/2022/06/24/building-a-modular-picker-with-an-ontimer-script/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now