Can we have clients update attributes with the click of a button?

Can we have clients update attributes with the click of a button?

  
Is there a way to "claim" an assignment? I have a form that is filled out by one entity, then placed on a page where only another type of entity can see. That form is a work request. So when the designer (second entity) views the form from the "client" (first entity) and decides that they want the job, I want to have a button that they click on to "claim" that assignment. which will move the form to their page and only they can see it.. I also want it that a designer can only have a certain amount of clients "claimed" at a time. When their status is changed they can claim more. I think i have the certain amount figured out but honestly have no clue if it is working... here is what i have...

When i set up the button i click New screen action... I have left the preparation alone which is getclients
I move onto the claim screen which starts out with a start and end...
i add a query and name it getallowedclients... and set the parameters to allowedclients (which is an attribute under the designers entity) then i set the entity to designers
I set the conditions to Designers.CurrentClients < AllowedClients meaning that the number in the attribute current clients is less than the attribute allowed clients... I have no idea how to set up these so they will keep track or how i can edit them to have a set number of allowed.
I set the queryproperties to GetAllowedClients.List.Current.Designers.AllowedClients
I put an if after the query and set the name to Not Exceeded? and set that to true then placed a assign widget next to it and named it Exceeded Assignment Limit. and set that to GetAllowedClients.Count for variable1 false and variable2 session.exceptionmessage and "Claiming this assignment will exceed your limit of allowed assignments"

After that i am working with using an update clients execute action widget but have no clue what i am doing... Will the above work for what i have intended it to do? I can not try it because for some reason when i publish to the localhost, it only shows the header, and background image and two links on the page, which is the homepage but the navigation is not there? is it not supposed to be on the home page?

How can i get the above to work if it doesn't and how can i stamp the clients entity, attribute, assigned to with the designers username when the specific designer clicks on the claim button? would it be too much to ask how to send an email to the client letting them know that the designer has claimed their assignment when the designer clicks claim?

Summary:
Create claim button that will check for allowed assignments, and prevent the designer from claiming too many,
stamp the client entity attribute Assigned to with the designers username
send an email to the client letting them knwo the designer claimed their assignment

Any help would be great! please
Hi Mary, and welcome to our community forums.

For someone who registered a couple of days ago, that's one of the most complete and complex questions I have ever seen, thanks to its detail. Congrats on that!

Indeed, by reading your question, it seems you have grasped it all - the problem you're facing is that, somehow, you're not being able to test it. Would you be able to send us your eSpace as attachment to a post, so we can see what's going on?

Regarding your questions, I'll try to answer them in the best way I can. All names I use are merely suggestions, though.

1. Create claim button that will check for allowed assignments, and prevent the designer from claiming too many,
and
2.
Stamp the client entity attribute Assigned to with the designers username

- Have the "AllowedClients" be a SiteProperty (it's a suggestion, but probably the best approach)
- Have a session variable that is the DesignerId (or, alternatively, have your DESIGNER table have an attribute that is the UserId)
- Create an entity named DESIGNER_CLIENTS, with an attribute ClientId (which identifies the client), and an attribute DesignerId (identifying the designer), and a boolean attribute named Active, that when is set to "true" means that the designer is still working on that client (i.e. it's claimed), and when the designer finishes the job, it's set to "false".
- When a designer clicks the "Claim" button, do:
---- Query the database, for all records of the DESIGNER_CLIENTS table where DesignerId = the current designer's DesignerId (either stored in the session, or retrieved from the database through the current session's UserId), and Active = true
---- If it's lower than the Site.AllowedClients value, create a new entity record, where DesignerId = current designer's Id, ClientId = current client's Id and Active = true.
---- If it's greater than the allowed client's value, display an error feedback message.
- When you want to retrieve the designer's name, query the database for
DESIGNER_CLIENTS where ClientId = the client you're looking for, and get the DESIGNER where Id = DESIGNER_CLIENT.DesignerId

3 - Send an email to the client letting them knwo the designer claimed their assignment

Regarding sending an e-mail, I suggest you look into our Send Email from Web Applications how to. You can also learn how to setup the Agile Platform to send e-mails through Gmail, for instance, and read more How Tos and Guides in our forums.

I hope this helps.

Do let us know how it all goes!

Regards,

Paulo Tavares


Hi Mary,

Sorry for the double post.

Regarding your debugging problem, see if this workaround helps, and let us know.

Regards,

Paulo Tavares