Workflow Action on Before modified record saved
Hi,
When creating a new update action on a workflow for "Before modified record saved", why can I not select a field from the "field to update" pick list that I have renamed?
If I do not rename the field, select it for the field to be updated with my fomula, then go into Admin > App Cust > Record Type > Field Steup and then rename the field and make it appear on the page layout, this works, but if I want to edit the formula for the workflow action, I cannot then select it as per my original issue!
Is this a bug or just the way the system works?
Thanks for any help/advice on this
Ok - further to this, if I use the Indexed Short Text 1 or 2 field and re-name it, then re-name it back to the original field name it does not appear in the list of Fields to be selected for the action when it was listed there originally before I renamed it.
Ideas anyone?
Similar Messages
-
No "before new record saved" trigger event in workflow definition ?
Hello,
I have following problem: I have to make a simple integration, where products have information about available quantity of given product . Assume we have field - it is called "Available amount" and it tells how many products are on stock. Now suppose we have created an opportunity, and we want to add Opportunity Product Revenue - we're selecting product and then quantity. I want to make OCOD to display message and prevent from adding opportunity product revenue, when its quantity is greater than "Available amount" field which is present in associated product record. I've created small C# application and used workflows to create Integration events. It works - but not exaclty how I want it - when I add a new record the workflow generates integration event - but I'd like to generate integration event before a record is created, also I'd like to show a notification from OCOD. But for "revenue" we do not have a trigger event called for example : "before new record saved" - we have only "when new record saved" and "before modified record saved".Hi,
From your requirement, it seems you, want some kind of check. Did you try puting this validation on field level, i guess you would need to join fields and compare in field validation. So, whenever user creates a new record this validation kicks and user is notified of the error. -
Workflow Action to update Picklist field
Hi,
I created a workflow. I want the workflow to do the following.
Workflow Conidtion*
If Condition is PM20 Bid Decision or PM20 No Bid then perform workflow actions.
[<plMileston_ITAG>]=LookupValue("OCC_CUST_LOV_OPTY_6", "PM020 Bid Decision") OR [<plMileston_ITAG>]=LookupValue("OCC_CUST_LOV_OPTY_6", "PM020 No Bid Decision")
Workflow Action*
FieldValue('<plProject_Category_ITAG>')=LookupValue("OCC_CUST_LOV_OPTY_2", "A")
I tried various combinations of using FieldValue,Just by putting the FieldName = A. Nothing works..I know the workflow Condition is working because when I update a free form text I am able to append the field. When I try to update a Picklist (Editable) it does not work. Dont know the reasons.
Also what is the standard way of updating a Picklist field using workflow.
Thanks for your help in advance
GautamHi !
I assume you created a workflow with the event trigger *"Before modified record saved"*.
Then you action Update values must be :
Field Name : select the picklist you want to update
Value : simply put LookupValue("OCC_CUST_LOV_OPTY_2", "A")
Overwrite Existing Values : check the box it if you want your picklist updated even if already filled
You don't have to repeat the fieldname in the value field of your action. It seems that you put FieldValue('<plProject_Category_ITAG>')= in the value field, but with that, it will not work.
Hope this will help, feel free to ask more !
Max -
Specific Due Date Syntax for Create Task Workflow Action
I'm looking for a formula which will create a monthly due date on a specific day of the month (ie 1st or 15th). I have figured out a way to create recurring activities through workflows by adding a recuurence picklist but I currently only have monthly recurrences as Today()+30 which works but is not as clean as a monthly task that occurs on the 15th of every month.
Record Type=Activity
Event=When modified record saved
Workflow condition=FieldValue('<Type>')='To Do' AND FieldValue('<plRecurrence_ITAG>')='Every 30 days' AND FieldValue('<Status>')='Completed'
Actions=Create Task
Recurrence picklist is a required field and is chosen be the end user upon creation of the original activity (Type=To Do). The duplicate activity is created upon completion (see condition) and now the end user has a recurring task due 30 days out. this future task has the recurrence in the subject (since the recurrence field cannot be defined in the workflow action) and the end user is prompted by the system to complete the activity record (choose a recurrence) upon trying to save the record as complete or by clicking the "Mark as completed" button. Thus the cycle is repeated.
All I'm trying to figure out is instead of having the formula [<DueDate>]+30 in the Due Date* field within the create task workflow action, I'd like a formula that can choose a specific day of the month. I've tried combinations of cast, concat, timeframe, month, year...expressions to give me the date value I'm looking for (ie 4/15/2011) but I can't get the syntax to work. all I need is that syntax that can provide a specific date (4/15/2011) derived from the due date. -
Updating field when new records saved.
Hi,
I was wondering if there are any suggestions on updating a picklist field when a new record is saved (as field updates only work for modified records).
We recently created a custom Probability % field that is tied to both the Sales Stage and another custom picklist field called "Business Type" (has two options - New or Existing). The Probability % field is updated based on a simple workflow that says if Sales Stage = x and Business Type = y, then Probability % = z.
For example, if the Sales Stage is = to "Validation" and the Business Type is = to "New", the Prob. % will be 5. If the Sales Stage is = to "Validation" and the Business Type is = to "Existing", the Prob. % will be 10... (just so you get the idea).
Since the workflow is tied to modified records, the new records keep missing the Probability % field.
Any suggestions on how we can get those newly created records have an updated Prob. % field would be helpful.
Thanks in advance!Thanks for the response, Min.
1) I've thought about the post default value, but the problem we encounter is that the user might not create an Opportunity in the very first sales stage- is there a way to place a default in the Prob. % field depending on the sales stage the record is created with?
2) I thought fields could only be updated when modified records saved - it isn't an option with the "new record is saved". Is there a workaround? I'm still quite new at this, so any help on how I can create a workaround would be great!
Thanks again. -
"Unable to load workflow actions from server. Please contact your server."
I get the following error message when I want to create or open a workflow in SharePoint Designer 2007
"unable to load workflow actions from server. Please contact your server
administrator."
I don't receive this error as a site collection administrator, but one of my contributors gets the error.What Chris mentioned is kind of abnormal situation described in
http://office.microsoft.com/en-us/sharepointdesigner/HA102379121033.aspx#20.
However, normally, you won’t be able to create SPD workflow if you only have Contribute permission level. I give the user Design permission level then he can
create SPD workflow.
There are other factors affecting permission to create SPD workflow:
1.
According to
http://office.microsoft.com/en-us/sharepointdesigner/HA101005871033.aspx#4
, the SPD workflows are stored in a site-level hidden document library called Workflows. You should make sure that user have permission in this document library so that the created workflow can be saved successfully.
http://blogs.msdn.com/sharepointdesigner/archive/2008/11/25/locking-down-sharepoint-designer.aspx
describe the method to manage permission for this hidden Workflows document library: open the site in SharePoint Designer >> right-click the Workflows library >> click Properties >> click the Security tab >> click the link “Manage
permissions using the browser”
2.
SharePoint Designer contributor setting (http://office.microsoft.com/en-us/sharepointdesigner/HA101174691033.aspx
) can also block the user from being able to create workflows. -
The list of workflow actions on the server references an assembly that does not exist
Hi,
This issue has been discussed many times in this forum , the reason why I am posting is I tried the resolution steps but I dont see any luck.
I am getting the below message from the SharePoint designer 2007 when I am trying to modify a workflow
"This list of workflow actions on the server references an assembly that does not exist. Some actions will not be available. The assembly strong name is Microsoft.SharePoint.WorkflowActions, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c.
Contact your server administrator for more information."
#1 : One of the post says "Normally you would see that error because someone has extended the Workflow actions available in SPD with a custom action developed in Visual Studio. These custom actions are loaded when your workstation reads the WSS.ACTIONS
file on the server. The file is located in the 12 hive under Template\1033\workflow. Your WSS.Actions file contains a reference to a custom action .dll which is not available on the server."
I opened the WSS.Actions file in notepad, I dont see any line with *.dll in it. Am I missing something?
#2: Another post says "The solution I discovered was that the server running my SharePoint Services was not up to .NET 3.0. As soon as I updated to .NET 3.0 everything worked.I had made sure the machine running SharePoint Designer was updated, but
had missed the SHarePoint Services server."
The server is already updated to .Net 3.0.
#3: I went to the %System Drive%\Documents and Settings\Local Settings\ApplicationData\Microsoft\SharePointDesigner.
Deleted the ProxyAssemblyCache folder but no luck.
Just checking if any one was able to resolve this issue by following any of the solution other than the above mentioned ones.
Thanks,
CutlooI have the similar issue with my custom work flow. I have searched the whole day for the solution but no success, then at last a simple track works for me. Please try this if any one faces such issue.
Basically the assembly that we have define in the ACTIONS file dose not exists on the server, because of two reasons, either we have given the wrong assembly name (in our case the namespace name inside our solution) or the PublicKeyToken may differ from the
original assembly, that are deployed in GAC.
So cross check both of these, in my case the assembly name was fine,
<Action
Name="Move Item to Another List and Send Email"
ClassName="MyAssemblyName.Classname"
Assembly="MyAssemblyName,Version=1.0.0.0, Culture=neutral, PublicKeyToken=4053d1fde8a1c781"
AppliesTo="all"
Category="Email actions">
But the problem was in the 'PublicKeyToken', so i double click on the feature inside my solution,then in the bottom i have clicked on the manifest tab to check the entries.
<Feature xmlns="http://schemas.microsoft.com/sharepoint/" Title="MyAssemblyName Feature1" Id="f7f1bda0-5f65-40f1-a705-f6f15a41da3a" ReceiverAssembly="MyAssemblyName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=0c32dbb769ed64b5"
ReceiverClass="MyAssemblyName.Features.Feature1.Feature1EventReceiver" Scope="WebApplication"></Feature>
Here i got the actual PublicKeyToken for my assembly (0c32dbb769ed64b5), i have replaced this number inside ACTIONS file, deploy the soultion, reset IIS.
It works for me, -
Modify Record Number in a Random Access File
Hi Does anyone know if I can modify the record number in the random access file hardware.dat for each hardware record each time and update it in hardware.dat to display it? Also why does it say "Record does not exist" if I modify the record number for a hardware and try to update it but could not find that record?
Here is the code below:
// Exercise 14.11: HardwareRecord.java
package org.egan; // packaged for reuse
public class HardwareRecord
private int recordNumber;
private String toolName;
private int quantity;
private double cost;
// no-argument constructor calls other constructor with default values
public HardwareRecord()
this(0,"",0,0.0); // call four-argument constructor
} // end no-argument HardwareRecord constructor
// initialize a record
public HardwareRecord(int number, String tool, int amount, double price)
setRecordNumber(number);
setToolName(tool);
setQuantity(amount);
setCost(price);
} // end four-argument HardwareRecord constructor
// set record number
public void setRecordNumber(int number)
recordNumber = number;
} // end method setRecordNumber
// get record number
public int getRecordNumber()
return recordNumber;
} // end method getRecordNumber
// set tool name
public void setToolName(String tool)
toolName = tool;
} // end method setToolName
// get tool name
public String getToolName()
return toolName;
} // end method getToolName
// set quantity
public void setQuantity(int amount)
quantity = amount;
} // end method setQuantity
// get quantity
public int getQuantity()
return quantity;
} // end method getQuantity
// set cost
public void setCost(double price)
cost = price;
} // end method setCost
// get cost
public double getCost()
return cost;
} // end method getCost
} // end class HardwareRecord-------------------------------------------------------------------------------------------------
// Exercise 14.11: RandomAccessHardwareRecord.java
// Subclass of HardwareRecord for random-access file programs.
package org.egan; // package for reuse
import java.io.RandomAccessFile;
import java.io.IOException;
public class RandomAccessHardwareRecord extends HardwareRecord
public static final int SIZE = 46;
// no-argument constructor calls other constructor with default values
public RandomAccessHardwareRecord()
this(0,"",0,0.0);
} // end no-argument RandomAccessHardwareRecord constructor
// initialize a RandomAccessHardwareRecord
public RandomAccessHardwareRecord(int number, String tool, int amount, double price)
super(number,tool,amount,price);
} // end four-argument RandomAccessHardwareRecord constructor
// read a record from a specified RandomAccessFile
public void read(RandomAccessFile file) throws IOException
setRecordNumber(file.readInt());
setToolName(readName(file));
setQuantity(file.readInt());
setCost(file.readDouble());
} // end method read
// ensure that name is proper length
private String readName(RandomAccessFile file) throws IOException
char name[] = new char[15], temp;
for(int count = 0; count < name.length; count++)
temp = file.readChar();
name[count] = temp;
} // end for
return new String(name).replace('\0',' ');
} // end method readName
// write a record to specified RandomAccessFile
public void write(RandomAccessFile file) throws IOException
file.writeInt(getRecordNumber());
writeName(file, getToolName());
file.writeInt(getQuantity());
file.writeDouble(getCost());
} // end method write
// write a name to file; maximum of 15 characters
private void writeName(RandomAccessFile file, String name) throws IOException
StringBuffer buffer = null;
if (name != null)
buffer = new StringBuffer(name);
else
buffer = new StringBuffer(15);
buffer.setLength(15);
file.writeChars(buffer.toString());
} // end method writeName
} // end RandomAccessHardwareRecord-------------------------------------------------------------------------------------------------
// Exercise 14.11: CreateRandomFile.java
// creates random-access file by writing 100 empty records to disk.
import java.io.IOException;
import java.io.RandomAccessFile;
import org.egan.RandomAccessHardwareRecord;
public class CreateRandomFile
private static final int NUMBER_RECORDS = 100;
// enable user to select file to open
public void createFile()
RandomAccessFile file = null;
try // open file for reading and writing
file = new RandomAccessFile("hardware.dat","rw");
RandomAccessHardwareRecord blankRecord = new RandomAccessHardwareRecord();
// write 100 blank records
for (int count = 0; count < NUMBER_RECORDS; count++)
blankRecord.write(file);
// display message that file was created
System.out.println("Created file hardware.dat.");
System.exit(0); // terminate program
} // end try
catch (IOException ioException)
System.err.println("Error processing file.");
System.exit(1);
} // end catch
finally
try
if (file != null)
file.close(); // close file
} // end try
catch (IOException ioException)
System.err.println("Error closing file.");
System.exit(1);
} // end catch
} // end finally
} // end method createFile
} // end class CreateRandomFile-------------------------------------------------------------------------------------------------
// Exercise 14.11: CreateRandomFileTest.java
// Testing class CreateRandomFile
public class CreateRandomFileTest
// main method begins program execution
public static void main( String args[] )
CreateRandomFile application = new CreateRandomFile();
application.createFile();
} // end main
} // end class CreateRandomFileTest-------------------------------------------------------------------------------------------------
// Exercise 14.11: MenuOption.java
// Defines an enum type for the hardware credit inquiry program's options.
public enum MenuOption
// declare contents of enum type
PRINT(1),
UPDATE(2),
NEW(3),
DELETE(4),
END(5);
private final int value; // current menu option
MenuOption(int valueOption)
value = valueOption;
} // end MenuOptions enum constructor
public int getValue()
return value;
} // end method getValue
} // end enum MenuOption-------------------------------------------------------------------------------------------------
// Exercise 14.11: FileEditor.java
// This class declares methods that manipulate hardware account records
// in a random access file.
import java.io.EOFException;
import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.util.Scanner;
import org.egan.RandomAccessHardwareRecord;
public class FileEditor
RandomAccessFile file; // reference to the file
Scanner input = new Scanner(System.in);
// open the file
public FileEditor(String fileName) throws IOException
file = new RandomAccessFile(fileName, "rw");
} // end FileEditor constructor
// close the file
public void closeFile() throws IOException
if (file != null)
file.close();
} // end method closeFile
// get a record from the file
public RandomAccessHardwareRecord getRecord(int recordNumber)
throws IllegalArgumentException, NumberFormatException, IOException
RandomAccessHardwareRecord record = new RandomAccessHardwareRecord();
if (recordNumber < 1 || recordNumber > 100)
throw new IllegalArgumentException("Out of range");
// seek appropriate record in a file
file.seek((recordNumber - 1) * RandomAccessHardwareRecord.SIZE);
record.read(file);
return record;
} // end method getRecord
// update record tool name in file
public void updateRecordToolName(int recordNumber, String newToolName)
throws IllegalArgumentException, IOException
RandomAccessHardwareRecord record = getRecord(recordNumber);
if (record.getRecordNumber() == 0)
throw new IllegalArgumentException("Record does not exist");
// seek appropriate record in file
file.seek((recordNumber - 1) * RandomAccessHardwareRecord.SIZE);
record.setToolName(newToolName);
record = new RandomAccessHardwareRecord(
record.getRecordNumber(), record.getToolName(), record.getQuantity(), record.getCost());
record.write(file); // write updated record to file
} // end method updateRecordToolName
// update record in file
public void updateRecordQuantity(int recordNumber, int newQuantity)
throws IllegalArgumentException, IOException
RandomAccessHardwareRecord record = getRecord(recordNumber);
if (record.getRecordNumber() == 0)
throw new IllegalArgumentException("Record does not exist");
// seek appropriate record in file
file.seek((recordNumber - 1) * RandomAccessHardwareRecord.SIZE);
record.setQuantity(newQuantity);
record = new RandomAccessHardwareRecord(
record.getRecordNumber(), record.getToolName(), record.getQuantity(), record.getCost());
record.write(file); // write updated record to file
} // end method updateRecordQuantity
// update record in file
public void updateRecordCost(int recordNumber, double newCost)
throws IllegalArgumentException, IOException
RandomAccessHardwareRecord record = getRecord(recordNumber);
if (record.getRecordNumber() == 0)
throw new IllegalArgumentException("Record does not exist");
// seek appropriate record in file
file.seek((recordNumber - 1) * RandomAccessHardwareRecord.SIZE);
record.setCost(newCost);
record = new RandomAccessHardwareRecord(
record.getRecordNumber(), record.getToolName(), record.getQuantity(), record.getCost());
record.write(file); // write updated record to file
} // end method updateRecordCost
// add record to file
public void newRecord(int recordNumber, String toolName, int quantity, double cost)
throws IllegalArgumentException, IOException
RandomAccessHardwareRecord record = getRecord(recordNumber);
if (record.getRecordNumber() != 0)
throw new IllegalArgumentException("Record already exists");
// seek appropriate record in file
file.seek((recordNumber - 1) * RandomAccessHardwareRecord.SIZE);
record = new RandomAccessHardwareRecord(recordNumber, toolName, quantity, cost);
record.write(file); // write record to file
} // end method newRecord
// delete record from file
public void deleteRecord(int recordNumber) throws IllegalArgumentException, IOException
RandomAccessHardwareRecord record = getRecord(recordNumber);
if (record.getRecordNumber() == 0)
throw new IllegalArgumentException("Account does not exist");
// seek appropriate record in file
file.seek((recordNumber - 1) * RandomAccessHardwareRecord.SIZE);
// create a blank record to write to the file
record = new RandomAccessHardwareRecord();
record.write(file);
} // end method deleteRecord
// read and display records
public void readRecords()
RandomAccessHardwareRecord record = new RandomAccessHardwareRecord();
System.out.printf("%-10s%-15s%-15s%10s\n","Record","Tool Name","Quantity","Cost");
try // read a record and display
file.seek(0);
while (true)
do
record.read(file);
while (record.getRecordNumber() == 0);
// display record contents
System.out.printf("%-10d%-15s%-15d%10.2f\n",record.getRecordNumber(),
record.getToolName(), record.getQuantity(), record.getCost());
} // end while
} // end try
catch (EOFException eofException) // close file
return; // end of file was reached
} // end catch
catch (IOException ioException)
System.err.println("Error reading file.");
System.exit(1);
} // end catch
} // end method readRecords
} // end class FileEditor-------------------------------------------------------------------------------------------------
// Exercise 14.11: TransactionProcessor.java
// A transaction processing program using random-access files.
import java.io.IOException;
import java.util.NoSuchElementException;
import java.util.Scanner;
import org.egan.RandomAccessHardwareRecord;
public class TransactionProcessor
private FileEditor dataFile;
private RandomAccessHardwareRecord record;
private MenuOption choices[] = {MenuOption.PRINT, MenuOption.UPDATE, MenuOption.NEW,
MenuOption.DELETE, MenuOption.END};
private Scanner input = new Scanner(System.in);
// get the file name and open the file
private boolean openFile()
try // attempt to open file
// call the helper method to open the file
dataFile = new FileEditor("hardware.dat");
} // end try
catch (IOException ioException)
System.err.println("Error opening file.");
return false;
} // end catch
return true;
} // end method openFile
// close file and terminate application
private void closeFile()
try // close file
dataFile.closeFile();
} // end try
catch (IOException ioException)
System.err.println("Error closing file.");
System.exit(1);
} // end catch
} // end method closeFile
// create, update or delete the record
private void performAction(MenuOption action)
int recordNumber = 0; // record number of record
String toolName; // tool name of the hardware instrument
int quantity; // total amount of items
double cost; // hareware tool price
int choice; // choose an update option
int newRecordNumber; // the updated record number
String newToolName; // the updated tool name
int newQuantity; // the updated quantity
double newCost; // the updated cost
try // attempt to manipulate files based on option selected
switch(action) // switch based on option selected
case PRINT:
System.out.println();
dataFile.readRecords();
break;
case NEW:
System.out.printf("\n%s%s\n%s\n%s","Enter record number,",
"tool name, quantity, and cost.","(Record number must be 1 - 100)","? ");
recordNumber = input.nextInt(); // read record number
toolName = input.next(); // read tool name
quantity = input.nextInt(); // read quantity
cost = input.nextDouble(); // read cost
dataFile.newRecord(recordNumber, toolName, quantity, cost); // create new record
break;
case UPDATE:
System.out.print("\nEnter record number to update (1 - 100): ");
recordNumber = input.nextInt();
record = dataFile.getRecord(recordNumber);
if (record.getRecordNumber() == 0)
System.out.println("Record does not exist.");
else
// display record contents
System.out.printf("%-10d%-12s%-12d%10.2f\n\n", record.getRecordNumber(),
record.getToolName(), record.getQuantity(), record.getCost());
System.out.printf("%s%s","\nEnter 1 to update tool name, ",
"2 to update quantity, or 3 to update cost : ");
choice = input.nextInt();
if (choice == 1)
System.out.print("Enter new record tool name : ");
newToolName = input.next();
dataFile.updateRecordToolName(recordNumber,newToolName); // update record
// tool name
// retrieve updated record
record = dataFile.getRecord(recordNumber);
// display updated record
System.out.printf("%-10d%-12s%-12d%10.2f\n", record.getRecordNumber(),
record.getToolName(), record.getQuantity(), record.getCost());
else if (choice == 2)
System.out.print("Enter new record quantity : ");
newQuantity = input.nextInt();
dataFile.updateRecordQuantity(recordNumber,newQuantity); // update record
// quantity
// retrieve updated record
record = dataFile.getRecord(recordNumber);
// display updated record
System.out.printf("%-10d%-12s%-12d%10.2f\n", record.getRecordNumber(),
record.getToolName(), record.getQuantity(), record.getCost());
else if (choice == 3)
System.out.print("Enter new record cost : ");
newCost = input.nextDouble();
dataFile.updateRecordCost(recordNumber,newCost); // update record cost
// retrieve updated record
record = dataFile.getRecord(recordNumber);
// display updated record
System.out.printf("%-10d%-12s%-12d%10.2f\n", record.getRecordNumber(),
record.getToolName(), record.getQuantity(), record.getCost());
} // end else
break;
case DELETE:
System.out.print("\nEnter an account to delete ( 1 - 100): ");
recordNumber = input.nextInt();
dataFile.deleteRecord(recordNumber); // delete record
break;
default:
System.out.println("Invalid action.");
break;
} // end switch
} // end try
catch (NumberFormatException format)
System.err.println("Bad input.");
} // end catch
catch (IllegalArgumentException badRecord)
System.err.println(badRecord.getMessage());
} // end catch
catch (IOException ioException)
System.err.println("Error writing to the file.");
} // end catch
catch (NoSuchElementException elementException)
System.err.println("Invalid input. Please try again.");
input.nextLine();
} // end catch
} // end method performAction
// enable user to input menu choice
private MenuOption enterChoice()
int menuChoice = 1;
// display available options
System.out.printf("\n%s\n%s\n%s\n%s\n%s\n%s","Enter your choice",
"1 - List hardware records", "2 - Update a hardware record",
"3 - Add a new hardware record", "4 - Delete a hardware record", "5 - End program\n?");
try
menuChoice = input.nextInt();
catch (NoSuchElementException elementException)
System.err.println("Invalid input.");
System.exit(1);
} // end catch
return choices[menuChoice - 1]; // return choice from user
} // end enterChoice
public void processRequests()
openFile();
// get user's request
MenuOption choice = enterChoice();
while (choice != MenuOption.END)
performAction(choice);
choice = enterChoice();
} // end while
closeFile();
} // end method processRequests
} // end class TransactionProcessor-------------------------------------------------------------------------------------------------
// Exercise 14.11: TransactionProcessorTest.java
// Testing the transaction processor.
public class TransactionProcessorTest
public static void main(String args[])
TransactionProcessor application = new TransactionProcessor();
application.processRequests();
} // end main
} // end class TransactionProcessorTest-------------------------------------------------------------------------------------------------
Below is the sample data to be entered into the random input file hardware.dat :
Record Tool Quantity Cost
Number Name
3 Sander 18 35.99
19 Hammer 128 10.00
26 Jigsaw 16 14.25
39 Mower 10 79.50
56 Saw 8 89.99
76 Screwdriver 236 4.99
81 Sledgehammer 32 19.75
88 Wrench 65 6.48Message was edited by:
egan128
Message was edited by:
egan128
Message was edited by:
egan128Hi Does anyone know if I can modify the record number
in the random access file hardware.dat for each
hardware record each time and update it in
hardware.dat to display it?If the "record number" is data that is stored in the file, then you can modify it. More precisely: it is possible to modify it.
The rest of the question had too many incompatible verbs for me to understand it.
Also why does it say
"Record does not exist" if I modify the record number
for a hardware and try to update it but could not
find that record?"Record does not exist" is a fairly reasonable error message for the situation where a program looks for a record but cannot find it. Are you asking why that particular lump of code actually does that?
(One thousand lines of code removed) -
Field Update workflow action - Updating today's date into a field
Hello there.
I was hoping someone might be able to help with an error currently being experienced with regards to this workflow action.
The requirement is for a workflow rule to action the printing of today's date into a custom field on an Activity record. The workflow rule condition is (PRE('<Status>') <> 'Completed') AND ([<Status>] = 'Completed'). This appears to be working and triggering the action correctly.
The custom field to be updated is of type 'Date'. The value being updated into this field is 'Today()'. Overwrite existing values is checked.
The default value for the field is also 'Today()'. Thus the workflow action involves overwriting the default value (i.e. the date the record was created) to the current date when the Status is switched to completed.
When the workflow is triggered the following error message occurs:
"Unable to evaluate workflow rule for the following reason:
Update [Custom field name] : The value '01/18/2008' cannot be converted to a date time value. (SBL-DAT-00359) (SBL-ODS-00500)"
One odd observation is that this error only occurs when trying to update activities that were created on previous days - (it will not overwrite the default value of 15/01/2008 with 18/01/2008). The workflow does not return an error message when asked to overwrite a value which is equal to itself (i.e. if the default value was 18/01/2008, the workflow runs without error, although the value stays the same as you would expect.)
Can anyone shed any light on this? One potential thought is that our CRM is set up so that all dates appear in a different format - i.e. dates appear as dd/mm/yyy, rather than mm/dd/yyyy. Could this be contributing to this issue?
Any help very much appreciated indeed.
Thanks,
Kieran
ps. The reason for doing all this is that 'Completed date' for an activity does not appear in reporting. This has been raised with Oracle and apparently an 'enhancement request' has been registered.Guys,
using the following statement, it does display the current system time
Mid(Timestamp(),4,2)+'-'+Mid(Timestamp(),1,2)+'-'+Mid(Timestamp(),7,4)+' '+Mid(Timestamp(),12,8)
Now When i do this , it displays me a time which is 3 hours ahead
Mid(Timestamp(),4,2)+'-'+Mid(Timestamp(),1,2)+'-'+Mid(Timestamp(),7,4)+' '+Mid(Timestamp() + (3.0/24.0),12,8)
My problem is to now display the difference of the current time stamp and the the time which shows 3 hours ahead in one field
Thats is substracting the first timestamp syntax fro mthe second timestamp syntax
and ofcourse if I copy paste both the syntaxes and put a minus sign in between, it doesnt work
Timestamdiff is not allowed in workflows or field validations :(
Anyone has any ideas?
Nick -
Condition check befor exporting records
Can we put any condition before the records get exported.
I.e as the records reach syndication manager for syndication i want a condition to be executed and then based on the result of condition i want syndication map to be selected
Ex:-
if acount group=zind i want syndication map CREMDM04 to be exceuted
els i want CREMDM04_FI map to be executed.
Can i at any place check this,whether in workflow or somewhere but b4 syndicating.
Plz reply me
Regards
LakshmiHi Shifali,
It is like , since you are using conditional Validation you should use the Branch step instead of the individual Validation step firstly.
You can have your set of 20 Validations as designed which will be applicable to all the records.
Create 2 sets of this group Validations so say you have
- Group1_Validations
- Group2_Validations
The Group1_Validations will have all the common validations and along with that the Acct group validation also which, will check if the account group of the particular record is ZIND.
The Group2_Validations will have all the common validations and along with that the Acct group validation also which, will check if the account group of the particular record is ZMIS.
So all the records which will fulfill all the common validations and have acct group as ZIND will move in one path
and the other records having acct group ZMIS will take the default path.
For the records taking the first path you can hav ethe syndicate step which will save the desired CREMDM04 port
and the deafult records will go to the other syndicate where that port will have CREMDM04_Fi deatils in the map.
So accordingly your records will get routed.
Your workflow will look like this
/Syndicate1-----Stop
Start-Process>Branch----<
/Syndicate2-----Stop
Branch will have 2 Validtion groups
Group1_Validations- Syndicate1
Group2_Validations- Syndicate2
Syndicate 1 will have port storing all the necessary settings that match CREMDM04 map
and Syndicate 2 will have the port storing all the necessary settings that match CREMDM04_FI map
You can have a glance on the below links to get a betetr idea:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/60f28084-b90e-2b10-3eb6-d6565367048a (LOOP in Workflows-Approvals)
https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/9180cbaf-0801-0010-f882-f2af6dc975d0 (Dynamism in mdm workflows)
Hope It Helped
Thanks & Regards
Simona Pinto -
How do I perform an action just before someone saves a data block?
Hi,
I need a trigger to attach to a datablock to perform some processing before the record is saved. I can't find anything suitable - I can see WHEN-VALIDATE-RECORD but this can run without you saving can't it? The code must only be executed when the user saves.
Can anyone help?
(Forms 6i)
Thanks AdamWhatever you do, DO NOT use a KEY-COMMIT trigger !
There are many ways a commit can be performed without firing that trigger.
There is also POST-FORMS-COMMIT, which despite its name, fires before commit, ie if form_trigger failure is raised in it, then the commit does not happen. -
How to tell if column value has changed for use in workflow actions
Hello,
I am using Sharepoint 2010 and for one of my Lists, I am using a general list workflow. What I need to be able to do is determine if a column value has change (say an "Assigned To" field) because I only want to take some action if that particular
value has changed. I want to be able to have a workflow action that would be something like:
If Current Item: Assigned To not equals [OLD VALUE]
I have found some web searches that talk about creating a duplicate list or duplicate (but hidden) column but that doesn't seem to be the way to go. I have document versioning set but don't if that can be used to help with this. One possible
thought (although I haven't tried it to see if it works) is to create local variables and have the values in the variables be the "old value". Just not sure if there is a best practices for doing this.
Thanks for any thoughts - PeterHelen,
Not sure I fully understand your goal. We don't use "tasks" at all but if you are looking to have your workflow check certain valus and be able to send email messages to people based on whatever, then you can certainly do that (as long as your Sharepoint
has the email setup. We do this for alot of workflow tasks.
So, in the workflow you can have a blanket statement like what I previously listed:
if Current Item:hiddenStatus not equals Current Item:Status
.... do something
or you can do something like:
if Current Item:hiddenStatus equals "In-Progress"
.... do something
Else if Current Item:hiddenStatus equals "Completed"
.... do something
or combine the two and do nested "if" statements. Then you add an email statement wherever you need it like:
if Current Item:hiddenStatus equals "Completed"
then email "these users"
To add the email part, just type in "email" on the line where you want to add a statment. There is only one option to choose from. That will display the line "then email these users". The "these users" will be a link. When you
click it you will get a popup to add the email info. We typically will send the email to a user (or users) that are already listed in one of the PeoplePicker fields. On the email form, you can type in your own text, designate that a value is based
on a column value (like our PeoplePicker), designate that a value is based on a workflow variable, add a link to the current item, etc. To get to these options you will click the button to the right of the fields or use the "Add or Change Lookup" button
in the bottom-left for the text area. There is alot you can set in the mail.
Does this help answer your question?
- Peter -
Hello,
I am facing a problem from last some days..
When I am trying to open/create/update workflows from Designer 2010, then designer giving me an error "Unable to load workflow actions from the server. Please contact your server administrator".
I researched on internet for this error and found some possible reason like
Login user Permission issue
Error in custom actions
So that I checked for permission for login user, but it has administrator rights. and I tried to open workflow by removing custom activity code, but still exist.
also if I tried to create/update workflow for another site on same server then it works without any problem.
Can anybody please help me?
Many thanks,
Nitin
N i T i NHi NiTiN4u,
Thanks for your post.
First, here are some troubleshoot workflow error form Microsoft site:
http://office.microsoft.com/en-gb/sharepoint-designer-help/troubleshoot-workflow-errors-HA010237912.aspx#BM20
Second, have you tried to close the site and open it again in SharePoint Designer 2010?
Third, try to restart your IIS and share the results.
SharePoint 2010 -
I lost power to my MacBook Pro before I had saved anything that I was working on...usually I plug my computer it and power it back on and the documents pop right back up when the computer turns on. That did not happen this time. How can I recover my documents?
If you never saved, auto save does not kick in.
Peter -
Workflow Action: Trouble adding a new line in "Description" field.
Hi folks. I'm really having a difficult time with this one and it seems so simple...
I am struggling with how to get a field update action to enter a line break in a note field. I've tried "\n", "\n\r", "chr(13)", "chr(10)", "<br>" and so on.... it just puts the text of what I use into the Description.
Here's the simplified workflow action...
[<NextStep>] + "\ \n" + PRE('<Description>')
What it's supposed to do.. is every time someone updates the field [<NextStep>], I want to replace the contents of the description field with the new value for nextstep (plus a new line) and then followed by everything that was in the description field previously. This way I have a running log in the description field.
Idealy it should put:
Today() + ": " + [<NextStep>] + <line break> + PRE('<Description>')
but when I add the Today() it ignores everything that follows. I'm not as worried about that as I am about the inablity to put in the line beak. Please help!!!
Thanks!
Edited by: ThinkGadget on May 11, 2009 9:13 AM because the forum interpreted the "\\n"
Edited by: ThinkGadget on May 11, 2009 9:15 AM (I put a space between the two back slashes so that the forum doesn't interpret it as a new line)I had used the "\\n" in my expressions to add a new line in the Description field. Only issue is also add a \ to the end of line but that was acceptable in my case. We are on OOD R16.
Maybe you are looking for
-
Multiple programs recording from same sou
Hi, I have a audigy and I cant use the record function in multiple programs. Like, when im using the teamspeak and try to open skype, just the teamspeak can record from microphone and skype dont work. Any help, thank you.
-
T60 - Lenovo 2623 laptop and Aluatek STD-19034 Universal Power Adapter
I have a T60 - Lenovo 2623 laptop with a standard power adapter that I got in an office lottery. It is a great system. I wanted to get a second power adapter to have in my day bag for the just-in-case situations and found an Aluatek STD-19034 Univer
-
How do i add more photo albums?
please help
-
Can't get mail after iOS 8.3 download
After iOS 8.3 download, I can't get my mail (ymail) On my iPad. Have tried deleting the account, adding a server, rebooting, everything I could think of. Still won't work. Does anyone have a fix for this problem?
-
Hi all, I need to generate an Idoc with type COND_A01. Does anyone have some insight on how can I do this? Please note that I don't want to use WE19, because what I need to do is to get some "real" data from the system and check what values go into w