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

Using all 3 Modes in the same form(new,edit,view)

Hey Guys, 

Im starting a new thread because my last thread was kinda confusing. 😛

 

So here is my detailed explanation: 

 

App Structure:

- Im loading all my CDS data into a local Collection.

- My gallery screen is filled with the local Collection items (but only shows Projekt No, order no and date)

- I got six other screens with forms which has my Local collection as datasource.

-  I have a save Button with a if  condition about connection status

  - connected : patch forms to CDS

  - !connceted: patch forms to offlineDataCollection 

This structure is already working 🙂

 

The Idea I want to implement

- I have a "+" button for a new item. That means my six forms has the mode "new" and all input fields in my forms are empty.

- I have a ">" button to edit a existing item (selected item from gallery). that means he switches to "edit" mode and fill the input fields in my forms with the data of the selected item.

 - For View mode there is a "View" button. I think its the same algorithm as the edit button has.

 

So my Question is what do I need to setup in my app ?

I have tried to use this guide as help. But I cant fill the forms :(.

My Edit mode is alaways like the New mode

image.pngMyGalleryimage.png"Edit Mode" Screen1 - form1

 

 

7 REPLIES 7
Super User
Super User

Re: Using all 3 Modes in the same form(new,edit,view)

@PivotMananger 

From what I understand your form's new and edit modes are showing exactly the same result.  I have a couple of suggestions:

 

#1 Make sure your gallery and your form have the same datasource in the Datasource property

 

your_datasource_name

 

#2 Change the Item property of your form to this code

 

Gallery1.Selected

 

#3 Make sure to define what mode the form should open. Change the OnSelect property of your nav buttons to this code.

 

Add:  NewForm(your_form_name);Navigate(other_screen_name,None);
Edit: EditForm(your_form_name);Navigate(other_screen_name,None);

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

 

 

PivotMananger
Level: Powered On

Re: Using all 3 Modes in the same form(new,edit,view)

image.pngMy Form Settingsimage.pngmy Gallery Settingsimage.pngMy Button

 

This doesnt work either 😕

PivotMananger
Level: Powered On

Re: Using all 3 Modes in the same form(new,edit,view)

it works If I use a new Screen with seperate forms  (even with local collection) 

image.png

 

So I really dont know what went wrong :s

Super User
Super User

Re: Using all 3 Modes in the same form(new,edit,view)

@PivotMananger 

If your issue is solved please close the thread.

PivotMananger
Level: Powered On

Re: Using all 3 Modes in the same form(new,edit,view)

only 50% working (does not work with toggles

on start Im saving my 2 options from my option set to 2 local variables

 

    Set(
        OptionValuesJ;
        OptionValues.'153490000'
//True
    );;
    Set(
        OptionValuesN;
        OptionValues.'153490001'
//False
    )

 

 

This is how im setting up my datacard with toggles

image.png

 

Now how do i read the right values from my toggle datacards in view and edit mode ? 

new mode does work 🙂

PivotMananger
Level: Powered On

Re: Using all 3 Modes in the same form(new,edit,view)

Ok somehow my local variables arent readable anymore.  

image.png

How can i setup offline option sets for my toggles ? (true or false)

so i can save them into my local collection ?

 

 

PivotMananger
Level: Powered On

Re: Using all 3 Modes in the same form(new,edit,view)

push 

Helpful resources

Announcements
New Ranks and Rank Icons in April

'New Ranks and Rank Icons in April

Read the announcement for more information!

Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (4,938)