maui Posted October 15, 2010 Posted October 15, 2010 How to take this format: 183|1,191|4,144|7...etc in a field, and create a new record for each set as follows ID Qty 183 1 (first record created) 191 4 (2nd record) 144 7 (3rd record) etc. Thanks!
maui Posted October 16, 2010 Author Posted October 16, 2010 Thank you very much comment. Very fast. Question, how would i set these in a portal named 'BaggingNeedsPortal' Thank you again. Maui
LaRetta Posted October 16, 2010 Posted October 16, 2010 (edited) I always enjoy your parsing techniques, Michael. I realize we can only go by the information provided and nothing was said that a quantity might be empty but, in this case, I would worry if there was no quantity. It would, of course, insert the ID again into the quantity. Maui, is there ever possibility that the quantity be empty? If so, an adjustment will have to be made. Edited October 16, 2010 by Guest Added sentence
comment Posted October 16, 2010 Posted October 16, 2010 Question, how would i set these in a portal named 'BaggingNeedsPortal' I am afraid I don't understand the question. Please elaborate.
comment Posted October 16, 2010 Posted October 16, 2010 I would worry if there was no quantity. You are absolutely right. However, I almost always prefer to present a technique without error handling first, so it can be easily understood. Once you understand the engine, it's time to move to the brakes, and then to the upholstery.
LaRetta Posted October 16, 2010 Posted October 16, 2010 Once you understand the engine, it's time to move to the brakes, and then to the upholstery. I shall remember this the next time someone corrects me for not providing enough contingency in my response. Usually I could write about four pages every time I answer. In fact, it gets me thinking about a hundred other possibilities and many times I'll go off in some side direction and then even forget what the original question ... Uh, what WAS the original question? :blond:
maui Posted October 16, 2010 Author Posted October 16, 2010 Thanks Comment!! Qty will NEVER be empty or equal 0, we validate beforehand with Javascript. My 2nd question is this. You are creating records on a table with the script you provided. Am i better off doing this or can i simply place a portal on the layout and create the records in the portal? Which is faster? Thanks Again! Maui
comment Posted October 16, 2010 Posted October 16, 2010 Portals are for the users - not for you (the developer). I always try (as much as possible) to work directly on the data level, rather than going through the presentation layer. This way my script will not break if I decide to remove the portal from the layout.
maui Posted October 16, 2010 Author Posted October 16, 2010 Thanks Comment, i really appreciate your help. one other question. I need to fire a script. See (Topic#217258). Can you help? thanks! Maui
Recommended Posts
This topic is 5152 days old. Please don't post here. Open a new topic instead.
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