Recalling the value of input fields in a form by using the _id passed from a dynamic page

I have a form, which upon the saving action creates a page for a dynamic page. By clicking a push-button, users are able to redirect to a form page. However, I can’t figure out how to recall the value of form elements according to the information of the page, in the dynamic page, users redirected from.
I am able to pass the _id of corresponding data from the dynamic page to the form page, using the Wix-storage function ‘session’. But when it comes to using this id for recalling data from the dataset into corresponding form elements, my problem begins.
I tried to use the function getCurrentItem in the following way but it gives ‘false’, which indicates the function get the correct id.

In the dynamic page:

import {session} from 'wix-storage';
$w.onReady( () => {
  $w("#dynamicDataset").onReady( () => {
   let items = $w("#dynamicDataset").getCurrentItem()
	let id = items._id
		 console.log(id)
		 session.setItem("mid",items._id)
  } 
  );

In the form page:

import {session} from 'wix-storage';
$w.onReady(function () {
 $w("#dataset4").onReady( () => {
	 let valuee = session.getItem("mid");
	 console.log(valuee)	 
		let myFromitems = $w('#dataset4').getCurrentItem()===valuee
		console.log(myFormitems)
 })
});

Am I in the wrong direction? How can I recall the saved value of input fields in the form?