Hello,
I am working on a stuff which requires me to generate a form like structure by using Collections as a data source. Tried using Forms with Collections, got to know that it's not a valid data source for Forms.
I am attaching the JSON below for reference.
I want to display the 'Key' (as label) along with the value (Text Input) in Form/Form like structure, It would be great if I get these fields dynamically populated once I click a button, I don't want to hard-code the fields and Text-Input.
Thank you!
hi @PTBBSolutions , hope you're doing good.
I have a use case scenario wherein we have a JSON file stored in Dataverse. How can we display the content from the JSON file (stored in Dataverse) in rich text editor control in canvas app.
I am using a Attachment control available in Form, through which I am able to upload JSON files into the Dataverse, I want the JSON file's content stored in Dataverse to be displayed.
I am trying to use a Flow, but unable to figure out.
Thank you.
Hi @PTBBSolutions ,
First(Collection_Name) will only return the first element
I want all the elements in the form fields, and moreover ThisItem.passwordLabel will give the value associated with "passwordLabel" key.
The following is my collection :
Collect(
CustomCollection,
{userLabel: "User ID"},
{passwordLabel: "Password"},
{forgotUserId: "Forgot user ID?"},
{forgotPassword: "Forgot password?"},
{keepMeIn: "Keep me signed in for 2 weeks"},
{saveUserId: "Save user ID"},
{signInButton: "Sign in"},
{cancelSignInBtn: "Cancel"},
{dontHaveId: "Don't have a user ID?"},
{createUserNow: "Create one now"},
{eRepairSignInWithPhoneNumber: "Sign in with phone number"}
)
based on the above collection, what I want is to display an edit form in the following way :
userLabel (as a label) : User ID (in a text Input, so that it can be edited)
passwordLabel (as a label) : Password (in text Input, so that it can be edited)
.
.
so on and so forth
I don't know if this is possible with a form. If this is not a viable way to solve this problem, alternative solutions will be much appreciated .
Thank you.
Hi @Rohit_RC ,
I have a collection which is created from a button click the following way:
Collect(MyCol,{userLabel: "User ID",passwordLabel:"Password"})
I also have an edit form with the following attributes:
1) DataSource: MyCol
2) Item: First(MyCol)
After that I manually add datacrds in the edit form:
After you have created a datacard, add a control in it (label or text input or whatever you want).
Set the Text property of your control (if it is a label) to /e.g/ ThisItem.passwordLabel.
This way your form will be always dynamic based on your collection:
@PTBBSolutions Thanks for replying
If we use Data sources like Excel, Dataverse tables for Edit forms, the fields (labels and text inputs) are automatically populated, in the same manner, if my data source for Edit Form is a Collection, I want the fields(Labels and text inputs) to populate automatically.
please suggest any alternatives accordingly
At present, I have created labels and text inputs in a blank vertical gallery, Please find the pic attached to this answer
I want the same to get populated in a Edit Form automatically based on my collection's key-value pairs.
Hi @Rohit_RC ,
What do you mean by "Collection is not a valid data source for Forms"? You can use a collection in your form, just change your Item property to First(YourCollectionName).
BTW, are you sure this is the way you want you collection to be structured? I think that you need to have all data in 1 row and not on multiple.
WarrenBelz
146,743
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,089
Most Valuable Professional