@setfield - field value reverts

Hi - I’m trying to set a field for an agent to access later. The field is a text field - have tried Editable / Computed when composed with same results.

The output from the @Prompt commands is as follows:

“Not set” (the default value of the field being set)

“POT” (the updated value)

“Not set” - it appears the field value is reverting (NOTE: I added the FILESAVE because I’m also seeing “Not set” in the field value from the called agent.

Thoughts or suggestions on why I am losing my update to this field?

Thanks

Formula in question is below:

@Prompt([Ok];“TACT_TA_to_add”;@GetField(“TACT_TA_to_add”));

FIELD TACT_TA_to_add := “POT”;

@Prompt([Ok];“TACT_TA_to_add”;@GetField(“TACT_TA_to_add”));

@Command([FileSave]);

@Prompt([Ok];“TACT_TA_to_add”;@GetField(“TACT_TA_to_add”));

@Command([RunAgent]; “Add_TACT_docs”)

Subject: Mmmm

Your code doesn’t have any @setfield commands in it - so I’m presuming they are in the agent?But more importantly, @Setfield only works in Edit mode when called from (I’m guessing) a button

Subject: Good catch - I tried @setfield AND FIELD :=

Sorry about that - I tried @setfield and FIELD := and forgot to change before posting. I have also added @command([editdocument];“1”) with no joy.

updated formula below:

@Command([EditDocument]; “1”);

@SetField(“TACT_Attendee_Event_Type”;“POT”);

@Prompt([Ok];“DEBUG”;@GetField(“TACT_Attendee_Event_Type”));

@Command([FileSave]);

@Prompt([Ok];“DEBUG”;@GetField(“TACT_Attendee_Event_Type”));

@Command( [RunAgent] ; “CreateTACTInputAtt”)

SOLUTION (at least something that works for me):

I removed the FILESAVE and my agent now sees the updated field value when invoked.