0

Do you guys have idea in script how can I copy the details on quotation GE-2108-0271-Rev.0 in few pages and paste the row at the bottom in the same sheet?

Page 1: to be exact I need the number increment by 1 from GE-2108-0271-Rev.0 to GE-2108-0271-Rev.1

enter image description here

Page 2: let say got 3 items

enter image description here

Page 3: Let say got 1 item

enter image description here

3
  • 1
    Welcome to Web Applications. Please show what you tried and add a brief description of your search efforts as is suggested in How to Ask. Commented Aug 20, 2021 at 14:50
  • Hi and welcome. Would you please give an indication/rating of your scripting skills. Also, when you say "idea in script" do you mean some suggestions about how to go about building the script? I'd be surprised to find an exact precedent for your scenario, but the logic and processing elements can be predicted; so it would be possible suggest how to develop the script, assuming that you have the skills to develop it.
    – Tedinoz
    Commented Aug 24, 2021 at 11:25
  • @Tedinoz Thank you for your reply, yes . how to building the script. I'm really new in Apps Script. Like know 1% in scripting.
    – Biha
    Commented Aug 25, 2021 at 0:20

1 Answer 1

0

You want suggestions about how to go about building the script for this task.

I am concerned that a scripting skill level of 1% is too low to be able to build the scripts for this task - it's like walking around the block and then deciding that on the weekend you will climb Everest. The task is very involved and you have not yet been exposed to the skills and techniques to complete it. I strongly urge you to try some of the simple tutorials to understand commands and syntax, and then to expand on that to develop your script.

May I outline the steps that you need to incorporate into your script. Of course, these are just my opinion; others might have a different view.

Get the row on M-Front

  • you will select a single cell or a row on "M-Front".
  • the script needs to identify the cursor's row number
  • there are some potential debugging issues
    • make sure that the current sheet IS "M-Front"
    • make sure that the cursor range is not greater than one row.
    • make sure that the cursor hasn't selected the header row

Get the quote from the M-Front row

  • you know the row number that the cursor is on
  • now you need to get the values for that row and, specifically, the Quotation number from Column B
  • you also need to get the ID of the last entry in Column Column

Increment the revision and append to M-Front

  • get all the values from the selected row
  • work out the current revision number (the last value in the revision number)
  • add one (1) to establish the new revision number.
  • append the existing values to the last row of the sheet and
  • update the ID in the "new" row by one.
  • on the original line, increment the revision number by one.

Update M-Items

  • find any rows that have the existing revision number and update cells on that items for the new revision number.
  • either use a for loop, or use indexOf to find all the occurrences of an element

Update M-Payments

  • rinse and repeat per M-Items

How to trigger the script

  • you need a way to trigger this script; a custom menu would be a good alternative.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.