Item Reference fields are all blank


Badge +3

Hi all, I have gone through the SmartForms integration wizard and created an Item Reference. I am now trying to use the fields in an email notification to no avail. They're all blank. I went into the rules on the form and made sure when the Workflow is started that the Item Reference is mapped to the correct SmartObject. I have made a list view on the SmartObject and made sure that everything is saving correctly.m I have also don'e at least about 50 other steps that I can't remember at this point, checking and re-checking everything. I have no idea what I'm missing.


10 replies

Badge +8

Hello Mallory,

 

When you look in your logs does it say that the smartobject execution event was successfull? Also have you tried to get rid of any filters and run form to see if the data populates at all? Is there anyway you can attach the wizard for the email event, so I can see what fields you are pulling?

 

Regards,

 

Matt

Badge +3

Hi Matt! Sorry, I have no idea how to look into logs, what logs I'd check for that, what I'd be looking for, etc :/ I can tell you that I've created an item reference and had this problem before and a consultant from K2 fixed it too quickly for me to follow along. I'm doing something wrong every time apparently. 

 

I don't really know what you mean by "filters." As far as I know, there are no filters anywhere in this process. For now, it's just a simple form that sends one email on create.

 

The fields I put in the email are things like the title that the user enters and then I have some Process data from the System folder in contedxt browser. That System stuff is all that's working right now, not of the form fields from the Item Reference are populated with anything and I've tried them all.

 

Badge +3

Somehow, when I added a data field and a line condition based on that data field's vaule (set on Save button click) it started working. I'm confused, but I'll take it.

 

Now, though, it creates a new record whether I update (save method) or create (create method.)

Badge +8

That is interesting, so if you use the data field it works now, but when you use the item reference field it does not? What happens to the other record when you applying the 'Update' method?

 

Regards,

 

Matt

Badge +3

Oh I just added a data field called IsUpdate to check if its an update (save method) or a create (create method) so that I can edit an existing record. 

 

I then set up line rules so I can take differeing actions depending on the vule of IsUpdate (0 or 1, being set by form rules)

 

Right now, when I try to update a record, it simply creates a new one with whatever I just put in and the original stays the same. Weeeeeeird!

Badge +7

Hi Mallory,

 

So it sounds like there might be some kind of rule issue. I'm guessing 0 is false and 1 true? So if I'm envisioning this correct, if the IsUpdate workflow data field value is 0 it'll perform a create method and if it's 1 it'll perform a save method? 

 

How does the workflow start? I may have missed this next one, but where does the 0 and 1 value get change/set and how exactly are you assigning those? Is it that you set the value to 0 immediately after clicking a Create button or set to 1 immediately if you click a Save button on your form?

 

To attempt to clear up some confusion, workflow data fields are needed if you're trying to pass pieces of specific information along in the workflow - such as a specific ID that was created in a smartform at the beginning of the workflow; it helps to identify specific instances. Sorry if that just confuses you more. Basically, without passing those data fields, you'll get the blank references because the workflow doesn't know what to reference. 

Badge +3

Ah, that explains why the item reference suddenly started working.

 

You have it exactly right, 0 is False, 1 is True and these values are getting set and passed to the workflow, then the workflow statrs, all on button click. I have another form that I did this with and its working normally. In comparing the two, I see no difference.

Badge +7

It's hard to visualize this not seeing it first hand but here are some questions/comments that may help track down what's up:

 

1. Maybe there's something wonky happening when the 0 and 1 values are set before the workflow starts? Are you able to test to make sure that the 0 or 1 values are being committed and set properly (e.g. have a message that returns the value after clicking a button to start the workflow)? Have you looked at the View Flow to make sure that the line rules are being followed correctly?

 

2. What is being updated (or supposed to be updated) -- one specific property of the SmO, a bunch of properties? And when this update method is happening are you seeing only a specific property in your form or are you seeing all the properties?

 

3. Is there a unique autonumber ID for the records being created and saved? What could be happening is the data field is not actually being handed off the correct information; if the workflow and the form isn't holding onto the correct ID, which would be the unique identifier of the record telling the form and workflow "this is the record that needs to be changed," then the workflow doesn't know to save/update the record. Instead, it will create a new record all together. You may want to check the configuration on what is being passed into the workflow data field. 

 

4. The Create method is working fine, correct? It's just the Save method you're having the issues with at this point? 

 

Badge +3

1. The WFis taking the correct path based on the value of IsUpdate, it's just that when I try to update a record it creates a new one instead of just changing the one I'm trying to change. I need to be able to edit a form later, not create a whole new one. It's working perfectly on this other form and everything is exactly the same, or as close as possible with it being two different forms.

 

2. All the fields in the SO should be updated, I guess they could possibly edit every field. I think the problem is that all I have is a save method, there's no traditional update method available. Create and save appear to do the exact same thing. Except of course on the other form, where they inexplicably work perfectly.

 

3. There is a unique ID, I have found that things tend to go horribly wrong with SmartBox SOs and no unique autonumbered ID haha. The IDs are fine, everything is fine other than the fact that a new record is created. Its just that save method, but I have run out of things to try and I'm completely clueless. There are only about 29485757392959676 combinations of things that you can try on a form with about 10 contrls on it. Thw WF doesn't do anything other than send an email, the form does pretty much everything (methods, etc) so I know its not the WF. What you're describing is what I have been thinking is going on, I just have no clue how to fix it. I've tried everything I can think of. Its set up EXACTLY like the one that's working.

 

4. Yes, create is working normally.

Badge +3

I fixed it somehow, no idea how! haha. Thanks so much for all your help everyone!

Reply