Can a button add a form to an update and jump to a certain tab? The form is not in most updates so open_form_comp isn't enough. I tried combining the two data symbols below but this didn't work.
{add_form_comp("Enterprise\CCC","PE-CCC","AFTER_CURRENT","OPEN") JUMP_TO_TAB('Diabetes Exam')}
{ADD_FORM_COMP(folderpath, name, insert_position)
OPEN_FORM_COMP(folder_path_and_name, tab_name)}
Thanks for the idea, it isn't working for some reason, similar to how jump to tab wasn't. It says the form component isn't in the chart. It does add the form but it is almost like the second part runs too quickly and doesn't see it.
These both work when I try them separately:
{ADD_FORM_COMP('Enterprise\CCC','PE-CCC','AFTER_CURRENT')OPEN_FORM_COMP('Enterprise\CCC\Exam\PE-CCC','Diabetes Exam')}
you have different paths in your 2 commands...
That is strange that open_form_comp worked alone, even with the wrong path, I just tried it again and it worked. There is not even an exam folder so maybe it skips it. But I did change it and still the same error message, do I have this right?
{ADD_FORM_COMP('EnterpriseCCC','PE-CCC','AFTER_CURRENT')OPEN_FORM_COMP('EnterpriseCCCPE-CCC','Diabetes Exam')}
we don't use CCC forms, but I would guess you need...
{ADD_FORM_COMP('Enterprise\CCC','PE-CCC','AFTER_CURRENT')
OPEN_FORM_COMP('Enterprise\CCC\PE-CCC','Diabetes Exam')}
I don't know where my backslashes went when I copied that text sorry, they are there though I just checked. I copied your text in though just in case and it still didn't work and you have the paths right.
These still both work when used alone though:
{ADD_FORM_COMP('Enterprise\CCC','PE-CCC','AFTER_CURRENT')}
{OPEN_FORM_COMP('Enterprise\CCC\PE-CCC','Diabetes Exam')}
I'm stumped. I even tried an action button calling 2 action buttons (add and open). Still got same error.
Thanks for trying it out. For now I am going to add the button for users who use the PE and tell everyone that if they want it to work they need to add the PE form to their update.
Stacey LaGrange said:
Thanks for trying it out. For now I am going to add the button for users who use the PE and tell everyone that if they want it to work they need to add the PE form to their update.
Could you have them click a button then:
1. set a background variable parameter, say "tab1 =1"
2. add new form ADD_FORM_COMP('....
3. (edit new form to look for parameter, if "tab1==1" then jump to tab, and reset tab 1 =0") then when the new form opens, it'll run some code {! yourCode..}.
Just a thought.
They are all using the same PE now so this was a blessing in disguise but I will give this a try so I know for next time, thanks