Why aren't my form fields loading with what I have Assigned them?

Why aren't my form fields loading with what I have Assigned them?


Here you can see I have a break point on the IF and I'm sitting just before the Assign

I step over that and get to the End statement and the form values have the correct values in them according to the debugger, I've "white-outed" the email addresses:

When I step over the End and the form loads, the Record's values are blanked out again:

I'm so confused. Where is the .. I don't want to call it "code" but, where is the location of whatever it is that is changing the form field values from what I have Assigned them to blank?

How do i fix this so that the form fields will prepopulate with values that I want, as I have said to do in the Assign statement?

Thanks in advance for your help! 

How do you assign it?

Assign the aggregate's attribute value.

I Think the issue is with the aggregate second call it brings no data according to the filter value you gave to it check the filter value and use directly the aggregate to assign the value to the inputs

Hi PJ,

First, nothing to do with your question directly, but notice the yellow/brown squigly lines below the If. This is a warning, probably caused by the fact that you compare an Identifier (CheckinId) with 0 (an integer), instead of NullIdentifier(). Don't do this. Change the 0 to NullIdentifier(), and don't ignore warnings. Note that the warnings are displayed on mouse over, and also in the TrueChange tab.

That said, where do you perform the Assign? In the Preperation or in a Screen Action? The difference is important, as only after the Preperation has run the Source Record is bound to the Form, so any changes you make to the Form directly are lost.

Hi all, thanks for the great feedback!

Answers: I am doing this Assign in the Preparation for the Screen. I am comparing to 0 because that is the value of the request parameter in the URL being passed to the page.

This is an Add New screen, so the aggregate will return no value to put into the form field. In this case, I want to prepopulate it with information passed into the page from the link. In this case, the email of the person checking in and the person entering the data about the checkin.

QUESTION: Is there a way I can run an action or something like that after the Preparation, but before the screen actually displays in the browser?


I figured it out! I was setting the form variables in the Preparation and then, as Killian said above, they were being overwritten, and now, from what I can tell, they are overwritten by the Aggregate GetCheckinById. Since that returns NO value, it creates a new record with default values in it.

So, to get the behavior I want, where I was updating values in the Assign statement like this:

SyntaxEditor Code Snippet

CheckinForm.Record.Checkins.Person = PersonId

SyntaxEditor Code Snippet

GetCheckinById.List.Current.Checkins.Person = PersonId

Thank you everyone! You got me on the right track.