Hi @v-bofeng-msft - thanks very much for your reply!
Could you help me confirm whether my understanding is correct:
About your data source:
My data source is a share point list with conditional fields - certain fields are visible depending on selections to drop down questions.
Data source 1:maindatasouce
Field name | Filed type |
Internal_email_lookup | Lookup |
EventName | choice |
YouAreHereTo | choice |
YouAreA | choice |
Twitter | Text |
HowLikely | choice |
Wouldyou | Yes/No(defaut:yes) |
Data source 2: Internal_email
Field name | Filed type |
Internal_email | Text |
About the attachments:
1\Screen1:
Button1(Check in):navigate to screen2
Button2(Check out):navigate to screen3
2\Screen2:
Form1:a form in New mode.
Button3(Check in): submit Form1 then navigate to screen3 -
After the check in step (submit form 1, it would navigate back to the welcome screen (check out will happen at the end of the event)
3\Screen3:
Form2:a form in Edit mode.
Button4(Check out): submit Form2.
Clarification about the Forms - it's the same form on both the check out and check in screens (from the same sharepoint list), with different fields visible depending on the section. I did not know how to include the same form across multiple screens so I did the above
About the Features:
1、If the user selects check in button, then jump to screen 2 to create a new record ("Wouldyou ..." field defaults to true), and then jump to screen 3 to select whether the "Wouldyou ..." field should be marked as false. By default, the form selects the record recently created by this user. - After creating a new record (submitform in check in) it would jump back to the welcome screen
2、If the user selects check out button, then jump to screen 3. By default, the form selects the record recently created by this user.
I assume the above assumption holds.
I’ve made a test for your reference:
1\Screen1
Button(Check in):
OnSelect:
Navigate(Screen1)
Button(Check out):
OnSelect:
Navigate(Screen3)
DisplayMode:
If(IsBlank(LookUp(maindatasouce,User().Email='Created By'.Email)),Edit,Disabled) /* Users who have not created a record cannot select this button*/
Could you clarify who you mean by User here? The app has to be available for both internal and external users and the app would be available to people through a communal device so I would be logged in (through my user account) and people arriving will be filling it in (they will not be 'logged in' so to speak). So the 'created by' field in the sharepoint list will always be me. Except for when the users will have a link and be able to log in to the portal to access the app. I would like it to have both options (for internals and externals..)
2\Screen2
Form1:
DataSource:
maindatasouce
DefaultMode:
New
Button(Check in):
OnSelect:
SubmitForm(Form1);Navigate(Screen3)
Attachment:Screen2.jpg
3\Screen3
Form2:
DataSource:
maindatasouce
DefaultMode:edit
Item:
LookUp(
Sort(
maindatasouce,
Created,
Descending
),
'Created By'.Email = User().Email /* Search the latest record created by the current user*/
)
Button(Check Out):
OnSelect:
SubmitForm(Form2);
DisplayMode:
If(IsBlank(LookUp(maindatasouce,User().Email='Created By'.Email)),Edit,Disabled) /* Users who have not created a record cannot select this button*/