You are viewing limited content. For full access, please sign in.

Question

Question

Changing username variable to reassign forms in a process

asked on May 10, 2017 Show version history

Hi there,

 

The way our system is setup at our company is that we have different formats for named users and participant users. Named user usernames are formatted like "Domain\this.user". Participant users simply use their email.

 

We are in the process of changing a user from a named user to a participant user. The problem is that they are currently in a process where the username is a field variable in the very first form. We could simply reassign the current task to the participant account, but they will have to fill out more forms before the process is completely finished. In theory, what I think will happen in this case is that future forms will be reassigned to the old named user license since the username variable was never changed.

 

Is there any way that, as an admin, I can manually edit the username variable even though it has already been set? The only other option I can think of is to manually reassign the form to the new license every single time they get assigned a form, but this is not ideal.

 

Thank you to any suggestions.

0 0

Answer

SELECTED ANSWER
replied on May 11, 2017 Show version history

Yes these are values for all variables in all forms/processes.

To update a certain variable in a certain instance submission:

1. Find your bp id, which is in the process URL like "/Forms/bp/routing/[bpId]";

2. Run query 

SELECT d.attribute_id, m.name FROM [cf_bp_dataset] as d
INNER JOIN [members] as m on d.member_id = m.id
  where d.process_id in (SELECT process_id FROM [cf_bp_processes] where bp_id = THE_BP_ID)

Then you should get a list of attribute_id and corresponding name; find the attribute_id for your variable. (If the script does not work, please tell me your Forms version)

3. Open the instance you want to update, note down the submission id on  instance history page

4. Update the value in [cf_bp_data] with combination of submission_id and attribute_id.

2 0

Replies

replied on May 10, 2017

If you can access Forms database, you can update the variable value saved in it. The table is cf_bp_data.

 

0 0
replied on May 11, 2017

I do have access but due to my inexperience, I'm not entirely sure what I'm looking at. These are my field variables in forms for all processes...?

0 0
SELECTED ANSWER
replied on May 11, 2017 Show version history

Yes these are values for all variables in all forms/processes.

To update a certain variable in a certain instance submission:

1. Find your bp id, which is in the process URL like "/Forms/bp/routing/[bpId]";

2. Run query 

SELECT d.attribute_id, m.name FROM [cf_bp_dataset] as d
INNER JOIN [members] as m on d.member_id = m.id
  where d.process_id in (SELECT process_id FROM [cf_bp_processes] where bp_id = THE_BP_ID)

Then you should get a list of attribute_id and corresponding name; find the attribute_id for your variable. (If the script does not work, please tell me your Forms version)

3. Open the instance you want to update, note down the submission id on  instance history page

4. Update the value in [cf_bp_data] with combination of submission_id and attribute_id.

2 0
replied on May 12, 2017 Show version history

This worked, thank you!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.