I have created a forecast app for the sales team
The forecast is stored as a sharepoint list and they can update their forecast using the gallery input
Each value is a new row so needs the customer id and date etc but on the form they complete all the values then press submit to save to the table.
Do i need to create a collection onchange for each value or can i submit all the changes in one go without a collection?
Solved! Go to Solution.
Hi @SimoneOS ,
In case you always want to create new items for all items in Gallery5, you can use a ForAll function to create them:
ForAll(
Gallery5.AllItems,
Patch(
ForecastList,
Defaults(ForecastList),
{Approved:false,
CustId:LookUp(ForecastList,CustId=Gallery1.Selected.'Acc No'),
dateadded:Now(),
Forecast:TextInput1.Text}
)
)
Hi @SimoneOS ,
You should be able to patch the inputs directly into the data source, but it seems you are getting an error.
To resolve, can you please share the Patch code and the error received?
Hi BCBuizer
The Patch code is:
Patch(ForecastList, Defaults(ForecastList),{Approved:false,CustId:LookUp(ForecastList,CustId=Gallery1.Selected.'Acc No'),dateadded:Now(),Forecast:Gallery5.AllItems})
The error message is: The type of this argument 'Title' does not match the expected Type "Text", Found type Table
Hi @SimoneOS ,
In case you always want to create new items for all items in Gallery5, you can use a ForAll function to create them:
ForAll(
Gallery5.AllItems,
Patch(
ForecastList,
Defaults(ForecastList),
{Approved:false,
CustId:LookUp(ForecastList,CustId=Gallery1.Selected.'Acc No'),
dateadded:Now(),
Forecast:TextInput1.Text}
)
)
User | Count |
---|---|
122 | |
87 | |
86 | |
75 | |
67 |
User | Count |
---|---|
214 | |
181 | |
137 | |
96 | |
83 |