multiple delete issues

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
tkilshaw
Posts: 170
Joined: Thu Jan 19, 2006 11:33 pm
Location: Western Canada
Contact:

multiple delete issues

Post by tkilshaw »

I have a process that deletes Accounts. This process has rules:

If Question.Reply='Yes' Then
DISPLAY QUESTION 'Continuing will delete this Account and all of its history. Sure you want to delete it?'

If Question.Reply='Yes' Then
Delete Account

I call it from a query. It is set to allow selection of multiple Accounts.

My Delete process is called multiple times, one for each selected account, so the warning message is displayed multiple times. I can't see any way around that problem.

Is there a way for me to give the message once and then delete all selected Accounts?

Failing that, I tried to put an identifier in the DISPLAY QUESTION text:

DISPLAY QUESTION 'Continuing will delete Account ' + Account.AccountID + ' and all of its history. Sure you want to delete it?'

But the same AccountID is displayed for every Account that is selected! The AccountID that is shown is that of the first Account that was selected from the list of Accounts.

This looks like a bug to me. Why would the deleted Account remain in the context? How can I display to the AccountID of the Account that is currently being processed?

It also highlights a recurring problem that I have with collections of objects in the context. There appears to be no way to regard the collection of Accounts in the context as an ordered set. I'd like to know:

1) how many are there
2) if they have an order
3) have some way to iterate over them in their order
4) have some way to index into them.

This probably files in the face of how Aware works though.

thanks,

Terry
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

Terry,

> Is there a way for me to give the message once and then delete all selected Accounts?
Yes. You can do it with a process containing the following three rules:

PICK ONE OR MORE FROM 'Accounts query'
DISPLAY QUESTION 'All selected accounts will be deleted. Do you want to proceed?'
If Question.Reply = 'Yes' Then DELETE Account
Aware IM Support Team
tkilshaw
Posts: 170
Joined: Thu Jan 19, 2006 11:33 pm
Location: Western Canada
Contact:

Post by tkilshaw »

I'm not sure if we are both talking about the same thing here.

I have a query call 'Accounts: All'. This finds all existing Accounts and shows a list of them.

On the query definition screen in the Operations area I have an operation called Delete that runs a process called Account_Delete. In the Form Operation window for invoking that process, Location is set to Next to the Item and Below the list, and "Applicable to multiple items" is checked.

When this query runs it displays a list of accounts with selection checkboxes on the left end of every Account item.

If I select multiple Accounts and click the Delete button that is below the list of Accounts, the Account_Delete process is called once for every Account that is selected. This includes the DISPLAY QUESTION.

I don't see how to make your suggestion work with what I have.

thanks,

Terry
aware_support2
Posts: 595
Joined: Sun Apr 24, 2005 2:22 am
Contact:

Post by aware_support2 »

Terry,

I'm sorry for not providing enough details in my previous post. The suggested solution is in addition to and completely separate from what you have now. The new process can be started from a menu item, for example Delete Accounts. The user will be able to select the accounts to delete and confirm the deletion prompt once, after which all selected accounts will be deleted. Since the process allows deleting multiple accounts in one go, you may want to restrict the process to users with Administrator access level.

The idea behind the new process (separate menu item) is that the user would use it when he specifically intends to do perform some account base cleanup and therefore delete multiple accounts. If he wants to delete an occasional account he can also do it using the query/process you currently have. With this approach you may want to consider removing the option of applying process Account_Delete to multiple items on query 'Accounts: All'.
Aware IM Support Team
Post Reply