Hi Steven Hardy
Understanding the Scope of Referencing Functions:
Referencing functions such as subscription(), resourceGroup(), location(), basics(), and steps() are designed to operate within the context of the main createUiDefinition.json file. These functions rely on the deployment context established during the creation of the managed application. When you define a nested createUiDefinition within a viewDefinition.json, the context may not be fully established, leading to the unavailability or incorrect evaluation of these functions.
Limitations in viewDefinition.json:
The viewDefinition.json file allows you to customize the managed application's overview and other views. However, it operates separately from the main createUiDefinition.json and does not inherently have access to the same deployment context. As a result, referencing functions that depend on deployment context may not function as expected within viewDefinition.json.
Potential Workarounds:
While there is no direct support for referencing functions within viewDefinition.json, you can consider the following approaches:
1.Pass Parameters Explicitly: Instead of relying on referencing functions, pass the necessary parameters explicitly from the main createUiDefinition.json to the nested createUiDefinition within the viewDefinition.json. This approach ensures that the required values are available without depending on the evaluation of referencing functions.
2.Use Static Values: If the values for the dropdown options are known and unlikely to change, you can hardcode them into the nested createUiDefinition. This eliminates the need for dynamic evaluation but reduces flexibility.
3.Implement Custom Logic: Develop custom logic within your application to handle the dynamic fetching of values. This might involve using Azure Functions or other services to retrieve the necessary data and pass it to the UI components.
The inability to use referencing functions within viewDefinition.json is a known limitation due to the separate evaluation contexts of the main createUiDefinition.json and viewDefinition.json. To work around this, consider passing parameters explicitly, using static values, or implementing custom logic to provide the necessary data to your UI components.
Please let me know if you face any challenge here, I can help you to resolve this issue further
Please do not forget to "Accept the answer” and “upvote it” wherever the information provided helps you, this can be beneficial to other community members.it would be greatly appreciated and helpful to others.