Tags:
create new tag
view all tags

Question

I have created an application that is based on a template and attached form which is used by our procurement team in the first place to create orders, then by our inwards goods team to track delivery of those orders and finally by our accounts team to track when orders are ready to be invoiced.

I have created a formatted search which displays all the purchase orders where the form field "InvoiceStatus" is 'Ready-to-invoice'. Our accounts team will then invoice those items. Then I need them to be able to mark all of those Purchase orders (which are all separate Twiki pages) as 'Been-Invoiced' (the InvoiceStatus field is a radio field with 3 options in the template form).

Is there any way this can be done from a single page (ie "mark all as 'Been-Invoiced'" or do they have to go and individually edit each purchase order and then return to the search and select the next one etc etc.

All help would be immensely appreciated!

Environment

TWiki version: TWikiRelease04x01x02
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: RedHat Enterprise Linux 5.1
Web server: Apache
Perl version:  
Client OS:  
Web Browser: Firefox 2.x
Categories: Forms

-- JaneGianoutsos - 06 Jun 2008

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

Ok, silence is beginning to worry me. smile

What about a piece of code that would allow them to click a button next to the entry and that would then transparently change the setting on that document, refresh the report and leave the user to then click on the next entry down to do the same until the search is returning nothing more to edit.

So for example - the following is what the formatted search looks like:

View-Edit PO
View entry Edit entry PO8324
View entry PO8327

Which is from the following code:

%SEARCH{"InvoiceStatus.*?value=\"Ready-To-Invoice\"" topic="08po*" nototal="on" nosearch="on" regex="on" <br> header="|*View-Edit*|*PO*|" format="| [[$topic][<img src=\"%PUBURLPATH%/%TWIKIWEB%/TWikiDocGraphics/viewtopic.gif\" border=\"0\" alt=\"View entry\" />]] <br>[[%SCRIPTURL%/edit%SCRIPTSUFFIX%/%WEB%/$topic?t=%GMTIME{"$hour$min$sec"}%&action=form][<img src=\"%PUBURLPATH%/%TWIKIWEB%/TWikiDocGraphics/edittopic.gif\" border=\"0\" alt=\"Edit entry\" />]] |$topic|"}%

I'd like to change the EDIT button in the first column to be somthing that they click on once they've done what they need to do in other systems and it will change the InvoiceStatus to "Been-Invoiced". Make sense?

-- JaneGianoutsos - 11 Jun 2008

In your SEARCH format, put a link pointing to the save script, passing parameter InvoiceStatus=Been-Invoiced. You can also pass the redirectto parameter to tell the save scrip to return to the page with the report. Here is an untested example:

format="| ... [[%SCRIPTURL{save}%/$web/$topic?InvoiceStatus=Been-Invoiced;redirectto=%WEB%.%TOPIC%][ -nice-Been-Invoiced-icon-here- ]] ... |"

If you use some AJAX magic you could avoid the save-view roundtrip.

See docs at TWikiScripts, TWikiForms, TWikiTemplates.

-- PeterThoeny - 12 Jun 2008

Fantastic, this works like a charm. (I haven't graduated to AJAX magic yet, but this solution is perfect anyway!)

Once again THANKS! I have so many people around the office converted to Twiki now, it's really quite exciting. And this is going to wow them further.

-- JaneGianoutsos - 12 Jun 2008

Glad it worked out for you. May be you can share your experience in a Blog post? Such as how you got the buy-in, support by management, the apps you built etc...

-- PeterThoeny - 12 Jun 2008

Absolutely. I'll wait until this one is up and running and everyone is oo-ing and ah-ing and then definitely post.

-- JaneGianoutsos - 13 Jun 2008

Change status to:
Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2008-06-13 - JaneGianoutsos
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.