Hi,
I want to allow users to modify and save a text box inside a gallery in my app.
I add a Button and set the onselect property to:
When I perform a change in the textbox and press the button it show me this error.
Error in [GalleryName]. To add elements to the docs library use SPFileCollection.Add().
I try to use Collect(PLANOS_MONTAJE_A;{PASOS: TextInput1.Text}) but does not work.
Any help?
Thanks in advance.
Operation not valid.
Error in [LibraryName]. To add element to the docs library use SPFileCollection.Add()
I try to use Collect(PLANOS_MONTAJE_A;{PASOS: TextInput1.Text}) instead but despite the error does not shows, doesnยดt work.
What can I do?
Thanks in advance.
Hey @Sephirot2000MU ,
I think the problem is with the syntax.
You're using this : Collect(PLANOS_MONTAJE_A;{PASOS: TextInput1.Text})
Replace ";" by "," after collection name.
Use : Collect(PLANOS_MONTAJE_A , {PASOS: TextInput1.Text})
I think it is considering this whole thing as collection (datasource) name "PLANOS_MONTAJE_A;{PASOS: TextInput1.Text}". That is why it is showing "Error in [GalleryName]".
I hope this simplifies your query if any more question let me know.
Warmly
----------------------------------------------------------------------------------------------------------------
Thanks for taking my inputs. If you're digging into it, a Thumbs up is appreciated! Or if my suggestion solved your issue, please Accept it as a solution. This way everyone would be able to get the solution if they face a similar problem
Thanks but does not work.
The error message doesnยดt show but the field reload with the original content.
Here I delete the content of the box
Now I press the button to update and the original content returns to the field.
Hey @Sephirot2000MU ,
After applying patch or update function. Try refreshing the collection or data source (Syntax: Refresh(DataSourceName)) may be data is updated at back-end and not updated here.
If it's not the case then check your update function if data is getting updated or not. I mean is it setting original value to "" instead of existing value.
Warmly
Rishab
Hi again.
Where I must put the Refresh(DataSourceName)?
Hey @Sephirot2000MU ,
After you've applied patch function or any update function on the On Select property of the button you're using to save/update the record.
Syntax: Patch(Something, Something, ... ); Refresh(DataSourceName)
Warmly,
Rishab
Hi again.
Same error. My button has this on the property.
Collect(PLANOS_MONTAJE_A; {PASOS: TextInput1.Text};Patch(PLANOS_MONTAJE_A;{PASOS:TextInput1.Text}) ;Refresh(PLANOS_MONTAJE_A))
You have to tell Power Apps which record to Patch. The below is an example using the List ID (you would have to refer to it where I have YourSelectedID.
Patch(
PLANOS_MONTAJE_A;
{ID:YourSelectedID};
{PASOS:TextInput1.Text}
);
Refresh(PLANOS_MONTAJE_A)
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @Sephirot2000MU ,
Just checking if you got the result you were looking for on this thread. Happy to help further if not.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
User | Count |
---|---|
185 | |
123 | |
90 | |
46 | |
42 |
User | Count |
---|---|
268 | |
159 | |
130 | |
84 | |
77 |