Hi:
I'm exporting a submitted form's data and importing it into the 2nd -> 3rd -> Etc... Forms, however, a lot of these fields I want to be kept Hidden unless they have a value. When I import the 1st forms' field data, it will import it all smoothly, however if the fields are hidden, you need to go through the selection of check boxes to make them visible again or just have them all visible all the time. I was wondering if there's a feature or coding that would go along the lines of: Once Imported XML /Or/ On "Refresh Fields" button click, go through fields and if Hidden fields now have a value make that Subform/Sub-Subform Visible.
The reason for this is that if you have an incident report form that can take 10 employee names but only 2 were involved in an incident, it would look very cluttery on the investigation form if there's 10 employee name fields, 10 Location Fields, 10 Airplane Fields, Etc... But only 2 employees were involved in a minor incident on the incident report form that didn't involve anything else.
Any suggestions or help would be greatly appreciated, and gratefull thank-yous to any replies.
Kindly,
Al
Solved! Go to Solution.
Views
Replies
Total Likes
Thank you for pointing me in the right direction... A little elbow grease, coffee, patience, and did I mention patience and the following works flawlessly
//Set to Mouse Up of Export Button:
xfa.host.exportData("",0)
//Set to Import Form button of other Forms:
xfa.host.importData()
//Set to Import Form Form:Ready to check the different sections "Check Boxes" to see if that section is suppose to be visible and makes it visible:
if(Button_DelDep.rawValue == 1)
{
Del_Dep.presence = "visible";
}
if(Button_DelArr.rawValue == 1)
{
Del_Arr.presence = "visible";
}
if(Button_Div.rawValue == 1)
{
Div.presence = "visible";
}
if(Button_MADiv.rawValue == 1)
{
MADiv.presence = "visible";
}
if(Button_DelDepXD.rawValue == 1)
{
Del_DepXD.presence = "visible";
}
if(Button_Other.rawValue == 1)
{
Other.presence = "visible";
}
Views
Replies
Total Likes
I could be wrong but I think because of the nature of hidden fields that won't work. It would work with invisible fields though.
If you are actually hiding fields (for flow, etc.) then you might want to reverse your logic and hide fields that don't have a value after the data has been imported.
Views
Replies
Total Likes
I'm able to import the data into the Hidden fields... The information transfers, it's just that the Action Script where if the certain check boxes are selected it will make that part of the form Visible does not occur so the information transfers into the Hidden Fields and those fields remain Hidden unless you reselect the appropriate check boxes. I'll make a quick desktop video to show you what I mean...
Views
Replies
Total Likes
I don't know if this will work but you could try adding xfa.form.remerge();
or xfa.layout.relayout(); to your script, one of those might retrigger everything.
Hopefully Niall will pop in with an idea.
Views
Replies
Total Likes
Hi Moore:
I tried both scripts under a click action of a button with no-joy. I really appreciate your feedback though.
I created and linked a really terrible demo-video to help clarify what I'm trying to accomplish, hope it helps:
http://www.youtube.com/watch?v=MngGihdORVk
Thank you
Views
Replies
Total Likes
Thank you for pointing me in the right direction... A little elbow grease, coffee, patience, and did I mention patience and the following works flawlessly
//Set to Mouse Up of Export Button:
xfa.host.exportData("",0)
//Set to Import Form button of other Forms:
xfa.host.importData()
//Set to Import Form Form:Ready to check the different sections "Check Boxes" to see if that section is suppose to be visible and makes it visible:
if(Button_DelDep.rawValue == 1)
{
Del_Dep.presence = "visible";
}
if(Button_DelArr.rawValue == 1)
{
Del_Arr.presence = "visible";
}
if(Button_Div.rawValue == 1)
{
Div.presence = "visible";
}
if(Button_MADiv.rawValue == 1)
{
MADiv.presence = "visible";
}
if(Button_DelDepXD.rawValue == 1)
{
Del_DepXD.presence = "visible";
}
if(Button_Other.rawValue == 1)
{
Other.presence = "visible";
}
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies