Hi Chen,
Here is the corrected code for your requirement, Here you need to pass the object and attribute name in the action get the value for attribute
// This file was generated by Mendix Studio Pro.
//// WARNING: Only the following code will be retained when actions are regenerated:
// - the import list
// - the code between BEGIN USER CODE and END USER CODE
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
// Other code you write will be lost the next time you deploy the project.
import "mx-global";
import { Big } from "big.js";
// BEGIN EXTRA CODE// END EXTRA CODE
/**
* @param {MxObject} projectCompletionDateObject
* @param {string} attributeName
* @returns {Promise.<string>}
*/export async function GetAttributeValue(projectCompletionDateObject, attributeName)
{
// BEGIN USER CODE
const value = projectCompletionDateObject ? projectCompletionDateObject.get(attributeName) : undefined;
return value;
// END USER CODE
}