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

SharePoint-Integration: Filling a variable in OnEdit-Mode

Hello,

I think the core of my "exercise" is quite simple, but somehow it is not working.

If the mode of my SharePoint integration form is "OnEdit" I want to set a variable:

Set(varTest, "Test");

I inserted a text field on my form. The default value is varTest:

2019-01-26 11_14_48-SupportTickets on Service Management (Template) forms - Saved (Unpublished) - Po.png

After publishing the form the value fieldvalue in edit mode is blank.

Why does the text field do not show any value?

Thanks for your response.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @sakleboe,

Where do you put your Set formula? Within the OnEdit property of the SharePointIntegration control within the app?

Based on the needs that you mentioned, I have made a test on my side, and don't have the issue that you mentioned.

On your side, please take a try with the following workaround:

Add the following formula within the OnEdit property of the SharePointIntegration control:

Set(varTest, Blank());
Set(varTest, "Test")

Set the Default property of the Text Input box to following:

varTest

In addition, I think it is not necessary to initialize a global variable to store the value you want to put within your Text Input box. As an alternative solution, please consider take a try with the following workaround:

Set the Default property of the Text Input box to following:

If(SharePointForm1.Mode = FormMode.Edit, "Test")

If the issue still exists, please consider take a try to remove the custom form from your SP list, then re-create a new one for it, take a try with above solution I provided, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Community Support
Community Support

Hi @sakleboe,

Where do you put your Set formula? Within the OnEdit property of the SharePointIntegration control within the app?

Based on the needs that you mentioned, I have made a test on my side, and don't have the issue that you mentioned.

On your side, please take a try with the following workaround:

Add the following formula within the OnEdit property of the SharePointIntegration control:

Set(varTest, Blank());
Set(varTest, "Test")

Set the Default property of the Text Input box to following:

varTest

In addition, I think it is not necessary to initialize a global variable to store the value you want to put within your Text Input box. As an alternative solution, please consider take a try with the following workaround:

Set the Default property of the Text Input box to following:

If(SharePointForm1.Mode = FormMode.Edit, "Test")

If the issue still exists, please consider take a try to remove the custom form from your SP list, then re-create a new one for it, take a try with above solution I provided, check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi Kris,

Thanks for your help.

I think your tipp with the global and lokal variable is correct. 🙂

While playing around I found out, that I can set a default variable value on the form screen --> OnVisible.

However, the same procedure is not working if I use the SharePointIntegration --> OnEdit.

Is there a explanation for that behaviour? Do I have to change the configuration for my app etc.?

 

Now I get the point.

I set the variable for the OnEdit mode, but I tested the behaviour in OnView mode.

That can never work. Sorry for the circumstances.

 

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (97,947)