cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tomas_Dang
Frequent Visitor

Stuck at filling Flow string output in PA sharpointform choices datacard

Hi all,

 

I am trying to create a "copy data into new form" button based on selected item in SHP list. e.i. I have a Proposal out of which I want to create an order with auto-filled data known from proposal.

 

I have created a flow which fills variables with selected item data, but it only returns string values into forms datacard. I am having trouble to fill the string values to choices, date and people datacards in the new form. Any idea how to grab this?

 

thx upfront Tomas

6 REPLIES 6
tchin-nin
Memorable Member
Memorable Member

Hi,

 

You can store the selected item into a variable and use this variable properties to fill prefilled your form. 

Let say you have a gallery of proposal.

OnSelect of the gallery : Set(duplicate,true);Set(duplicateProposal,This item); Navigate(createscreen,none)

 

On your form :

The default value of the title datacard for example should be :

If(Form.Mode=New && duplicate, duplicateProposal.Title,ThisItem.Title)

 

Don't forget to reset the duplicate flag for a classic blank creation : 

Set(duplicate,false)

 

Theo

Hi Theo,

 

did not work for me.

 

Capture3.PNG

Basically I have a variable set up from the flow as "PA.division", "PA.title" etc., as I wrote I have troubles to return the value in a form Choices datacard with list of values. It returns the string variable only into textboxes(see the white ones) or text datacards.

You don't even need flow. You can store the item you want to duplicate into a variable in PowerApps. Et then use this variable to define the default property of your DataCards, so the form is prefilled.

Théo

Actually, I thought I dont need a flow at first, but could not make it work. I am kinda noob, could you please advice how to set it up not from a gallery but from a form?

 

On the view screen, I filled OnSelect Properity of a button to: Set(duplicateProposal;SharePointForm1_2) ;; Set(duplicate;true) ;; Navigate('Landing page_newCC';ScreenTransition.Cover) = I checked the global variable and it stores the data of the form.

 

On the new screen, I tried to set the division datacard value to: If(Form.Mode=New && duplicate = true; duplicateProposal.Updates.Division;ThisItem.Division), here I get an error "invalid argument" do you know why?

 

I am thinking, since I took the whole form into a variable, is it possible to set the Item properity of the new form so it fills all datacards from the variable?

 

Thx for your patience

 

 

 

 

Hi,
I need to know what are you trying to duplicate. Is a an item just submit by your form ?

If so, you should try storing this
Set(duplicateProposal;SharePointForm1_2.LastSubmit)

So the duplicateProposal will have every properties of the last submitted item through the form.
You'll should be able to use
duplicateProposal.Division to set your field.

Using Form.Updates retrieve only the changes submitted by your form (not the whole item like LastSubmit)

Théo

Hi Theo,

 

well I want to duplicate the data of an item from the shp list. To this point everything is good as you can see on the screenshot below, I was able to save the data into global variables.

Capture2.PNGCapture3.PNG

When I am retrieving the data into the new form I am okay with retrieving string and date&time data, see screenshot below. I am using on the default poperity "duplicateProposal.Updates.XXX" (XXX = Title/Date From/Date To etc.).

For the choices datacards I dont get an error anymore, using:

  • default properity: "duplicateProposal.updates.division"
  • Items properity: "choices(Proposal.division)" ,

but the value or lets say choice is still not selected/shown, as you can see in the screenshot below.

Capture.PNG

I even played with default "{Value: duplicateProposal.Updates.Division; '@odata.type':"#Microsoft.Azure. Connectors.SharePoint.SPList ExpandedReference"}". I did not get en error, but still nothing shown/selected.

 

Thx again

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,288)