rwilson504 / PCFControls

Reusable PowerApps Control Framework (PCF) controls.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No Component

forceworks opened this issue · comments

Hi Rick, trying out the calendar control. Installed managed solution, but no control visible :(

commented

Hi Steve,

If you are trying to add the control in a canvas app:

  1. After installing the solution file, make sure that code components is enabled for the org you are using,

  2. Open the canvas app, navigate to components > Import > Code > Calendar

  3. To add it to the screen, you need to click the "+ Insert" button on the left nav bar

  4. Navigate and expand "Code components" and select Calendar
    (Note: Code components, for me, are not shown under the usual top menu bar "Custom" where I would expect them to be. Could be by design or a bug.)

Overall I have found this is a really great calendar control for Canvas apps.

I haven't worked with using the control in a model app yet. So I can't help you there.

Hope this helps,
-Art

image

commented

I do know that in a model app, you have to create an entity view, and add the control to the view and indicate the fields used for event name, start date, end date.

The control is view specific and can't be added at the entity level as a control that applies to all views as you can do with the Dynamics calendar control.

-Art

PS. I have a long list of issues I would be happy to add to your list on needed AppSource fixes :)

Steve,

Can you provide some screenshots of what how you are attempting to add the control in a Model app? I'm able to see the control there and have it working.

image

@rwilson504
Hi Rick

Can I ask your advice on using the Calendar PCF control in a canvas app?

I've successfully imported the Calendar PCF using the managed solution from Github, and am able to insert it into my canvas app. However, I'm not sure what I'm doing wrong to get the calendar to show events.

My scenario:

  1. I have a CDS entity called "myevents" created with fields "myevent", "start" & "end"
  2. The unique identifier for this entity is "hc_myeventsid", and the primary field is "myevent"
  3. Data from this entity is loaded into a collection (colAppt) in the canvas app, as recommended in the readme. I am using AppStart to load the collection (and yes, AppStart has been run :) )
  4. in the PCF control, I have put "hc_myeventsid" (with the double quotes) in the eventid field.
  5. In the field calendarDataSet_Items, I have put the collection as the source.
  6. No fields have been selected under Properties for the control.

But the calendar is not showing the events. I have saved, exited, and restarted the app as well.

Putting just hc_myeventsid (without the double quotes) throws an error

What am I missing?

In the calendar properties did you fill in the name of the Name, Start, End Fields?

image

Also instead of building out my collection in the App Start I have moved to doing it into a toggle which allows me to run functionality on the onCheck and onUnCheck.

image

Also I just uploaded a sample managed solution you can install.

This sample does not include the Calendar component in it so that you can easily install/remove this managed solution without accidentally removing the Calendar component from your system.

There is a model app included with the solution so you can easily add/modify data and it also includes a Canvas app where i have provided different ways you can utilize the calendar.

https://github.com/rwilson504/PCFControls/blob/master/Calendar/Sample/CanvasCalendar_1_0_0_1_managed.zip

Let me know what you think.

Thanks,

Rick

Thanks Rick - much appreciated

The import of the managed solution fails, as it requires a custom control which I don't have (screenshot below)

image

But I just configured the React Calendar again from scratch with a custom entity which had the relevant fields, and it works.

When I changed to using the standard Appointments entity in CDS, the control doesn't seem to work if connected directly to the entity in CDS. I suspect this is because Appointments uses activityid as it's GUID, which is really just a pointer.

But if you load the Appointments entity to a collection, it seems to work.

Have you experienced something similar?

Yes i have found that attaching directly to a CDS entity usually doesn't work. I would always suggest using a collection.

Also here is an updated Sample that does not include the Scheduler component.

https://github.com/rwilson504/PCFControls/blob/master/Calendar/Sample/CanvasCalendar_1_0_0_3_managed.zip