When a form is in edit mode, I would like to set the value of one of my fields (a text box). This does not error out, but it doesn't update the field either. What would be a better way of accomplishing this?
Solved! Go to Solution.
Out of curiosity, what exactly are you trying to accomplish by doing this?
If anything was already typed there, it would be erased and saved over with your default message anytime the Form was Edited, and that seems like a strange way for any type of input to behave.
Yes, you are right! It's actually a field for me to use in the workflow. I want to use a choice field but was getting errors with that, so I was playing with it as a plain old textbox (textbox will work fine for my purposes since I'll be populating the field with what I need). The user won't edit the information. I want the value for the workflow and can't identify an existing field on the form that I could use instead. Thank you for your reply.
So you have an Item Form that you want to contain a Control that a user cannot interact with, which will be used / queried to relay *some* type of information to a Workflow? yes?
If that's the case, maybe a Calculated Value Control would be better suited for what it is you're doing.
Based on your last reply I'm not sure if you still want help with this topic or if you plan on going about this a different a way, but no matter, if you can describe just a bit more about the problem I'm sure that it can be solved.
Thank you so much.
I sometimes forget about the calculated field option. That might work better. I will post what I end up doing.
What I really need is a way to put a few lines of code in a Form Load event
We're all here to help one another, so I think that if you were to describe exactly what it is you're trying to do, we can work together and probably get it solved.
What exactly is it that you'd like to happen?
I got myself into an infinite loop by calling a workflow from a workflow that is started when an item is edited. If I could set some conditions based on the form and what's going on, I could use that in the workflow to prevent having workflow A call workflow B which then triggers workflow A. I think the whole thing could be solved by putting it all in one longer workflow but it seems (seemed?) more manageable to break it into two pieces since there's a fair amount going on in each one (parsing a repeating section is done in one workflow by itself).
Well. Let's look at what's going on with those workflows and why they would be set up in such a way that it's causing them to loop.
What is Workflow (A) doing and how it set to run?
What is Workflow (B) doing?
Workflow A is triggered when a list item is edited. It calls Workflow B to get 3 values from a repeating data control (three fields from the most recent entry in the repeater), and it updates the list item with these three values so I can easily use them elsewhere (for example, the users have a list view on a site page that shows the current status and location of their items - this information is pulled from the repeating data control). When Workflow B is done, I return to Workflow A and do various whatnots - email notifications, steps that are taken if an item is removed from inventory or sent out for repair.
The trouble is that Workflow B, by updating the list, is causing Workflow A (triggered by an edit) to begin again. So I was thinking if I had a value on the form, for my admin use only, I could use it as a flag at the top of Workflow A. If flag = somevalue, then go ahead and run this workflow. Otherwise, exit. I am totally open to doing it some other way. At the time it seemed like such a simple route to go.