Get current account, nanoflow native

0
Hi all,  We are venturing into the world of native apps and I have started to build a native version of out care and support app. For reference the domain model is set up as Account * – * Service 1 – * People We Support  In my web app, the user can see a list of the people they support, the listview is nested within a microflow which retrieves their account from the database using [id = $currentUser] I am aware that you can’t use $currentUser within a nanoflow. Is there an alternative way that anyone knows which would allow me to have a list view which shows the user the people they support based on the services that they are associated to? And all in native… Thanks in advance
asked
1 answers
6
// This is quite straightforward to do with a javascript action

/**
 * @returns {Promise.<MxObject>}
 */
export async function Currentuser1() {
	// BEGIN USER CODE
	return new Promise((resolve, reject) => {
		mx.data.get({
			guid: mx.session.getUserId(),
			callback: resolve,
			error: reject
		});
	})
	// END USER CODE
}

answered