0

I've SP 1 form where user's fill Service Area, Secondary Code, Record Series Title fields and when they click Electronic Partial (x) check box another SP 2 form will pop-up and wants the same three fields information to be auto populate taking values from SP 1 form. Is it possible?? thanks for the help.

SP 1 Form

SP 1 Form

Sp 2 Form

0

I am afraid that it cannot be achieved directly in InfoPath form.

You could add the custom code in the InfoPath form page to achieve it .

You could create two views in the InfoPath designer and pop up another InfoPath form.

You could refer to the articles below.

Modal Popup in Sharepoint by javascript.

Window.sessionStorage.

0

This might be quickly resolved with local storage.

Get the field value when it changes.

// Get value
var serviceArea = $('[id*="Service_x0020_Area"]').val();
// set variable in localStorage
localStorage.setItem('localServiceArea', serviceArea );

And then set the field on you second form on load.

// Set Order Number
console.log(localStorage.getItem("localServiceArea"));
$('[id*="_Order_x0020__x0023_Field_"]').val(localStorage.getItem("localServiceArea"));

This is just the basic code. Let me know how familiar you with jquery and if you need some more help on how to implement this.

UPDATE: You'll have to add a "Script Edit" to each NewForm and include the following script.

<!-- New form source -->
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script>
    $(function () {
        $('input[title*="Title"]').on("change paste keyup", function() {
            var title = $(this).val();
            localStorage.setItem('localTitle', title );
        });
    });
</script>


<!-- New form destination -->
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
<script>
    $(function () {
        $('input[title*="Title"]').val(localStorage.getItem("localTitle"));
    });
</script>

This will basically just grab the text from your title field and make it available to your second title field. You'll probably have to change the selector to your column title.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.