cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
jk264
Level: Powered On

Offline Functionality

Hi

I am building offline functionality for an app, the app has to support the functionality of CRUD operations for a CDS entity.

The entity has various field types which includes text, whole number, option sets and Lookup. Using form with Edit mode requires me to use the Data source, but as i am storing into a collection, so i have decided to use the scrollable screen with all the controls added and individually binding(Option set, Lookup types) them with local collections.

The issue i am facing is showing the screen for Create and Edit. I want to display empty screen if Create is clicked, show the screen loaded with control values if it is an edit of the record selected from Gallery. For some reason, the Gallery has it's first record selected automatically.  So setting the control's default as Gallery.Selected.Field is always showing the data even for Create record.

I am passing a varible from Gallery screen to Edit screen to identify Create/Update, using conditional Default for text boxes works fine, but not for combo boxes/Radio buttons.

 

Is that approach right? Any thoughts on what should be set for combo boxes/Radio buttons.

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
v-siky-msft
Level 8

Re: Offline Functionality

Hi @jk264 ,

 

Have your issue been solved by the workaround above?

Please feel free to reply me if you still have problems.

 

Best regards,

Sik

 

5 REPLIES 5
v-siky-msft
Level 8

Re: Offline Functionality

Hi @jk264 ,

 

Could you show more error information?What is your issue with Combo Box/Radio Button?

What is the data source of Combo Box/Radio Button? Do you mean you use an individual collection to store Option set which is used for Combo box?

 

Judged from you context, do you want to know how to change the default value of Combo box/Radio button between the modes of ‘create’ and ‘edit’?

Maybe you can refer to the following formuals:

TO Combo box:

Set the DefaultSelectedItems property of combo box as below:

 

If(CorE = "Edit" , Gallery1.Selected.Variety)

 

To Radio button:

Set the default property of Radio button as below:

If(CorE="Edit",Gallery1.Selected.Variety.Value,"")

Annotation 2019-08-23 182217.pngAnnotation 2019-08-23 182236.png

Please have a try and check if it will solve your problem.

Best regards,

Sik

jk264
Level: Powered On

Re: Offline Functionality

Hi Sik,

Thanks for your response, combo box is working fine, i didn't realise there is a property called DefaultSelectedItems, i was setting the Default. But the radio button still an issue, i am binding a local collection which is of type Option set. So if i set the Default to If(UpdateRecord=true,galleryOffline.Selected.Turbulence,""), it is complaining on the "" because of data type mismatch.

How do you clear it?

 

Thanks

v-siky-msft
Level 8

Re: Offline Functionality

Hi @jk264 


The Default of Radio button must be the value, not record.

so we should use a ''.'' behind the galleryOffline.Selected.Turbulence to add the value parameter.

you can refer to my test formula:

 

To Radio button:

Set the Default property of Radio button as below:

If(CorE="Edit",Gallery1.Selected.Variety.Value,"")

 

Best regards,

Sik

v-siky-msft
Level 8

Re: Offline Functionality

Hi @jk264 ,

 

Have your issue been solved by the workaround above?

Please feel free to reply me if you still have problems.

 

Best regards,

Sik

 

jk264
Level: Powered On

Re: Offline Functionality

Hi Sik,

Thanks, it worked.

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Users Online
Currently online: 45 members 4,831 guests
Recent signins:
Please welcome our newest community members: