This topic contains 3 replies, has 3 voices, and was last updated by  Lauren Naslund 7 years, 7 months ago.

  • Author
    Posts
  • #73891

    master
    Participant

    Hello,

    I am having trouble when an event has multiple resources. When I add more than one resource to an event it shows up on the calendar after the MonkeyBread call to update the single event, but it disappears after a normal, full refresh.

    The resources are in the Resource field with a return delimiting each resource, e.g.:

    Richard

    Mark

    The url has both names in the &Resource and the &filter_resource parameters. I need to manually edit the event record’s Resource field by removing one of the names in order for the refresh to show the event again.

    Do you have any advice?

    Thanks — Mark

  • #73892

    admin
    Keymaster

    Hi Mark –

    Entering “&Resource=Mark” will look for event records that only match “Mark” exactly. It won’t match records with both Mark & Richard in the field.

    There are a few ways around this. The quickest workaround is to use a repeating field just for the purpose of filtering the view. Each value of the repeater will be a single resource. Then “&ResourceRep=Mark” will work fine.

    You can use the following calculation for this repeating field, where “Resource” is the name of the field containing a paragraph-delimited list of resources):

    Let ([

    _multikey = Extend(Resource);

    _rep = Get ( CalculationRepetitionNumber )

    ];

     

    GetValue (_multikey; _rep)

    )

  • #73893

    master
    Participant

    Hi Ken,

    I added the calc field ResourceRep as you suggested and adjusted the layout and Calendar Settings. I now have an event where Resource = Mark and Richard. The field ResourceRep has Mark in the first repetition and Richard in the second, as expected. However the calendar only draws the event under one resource, Mark. Here is the url:

    http://…&filter_resource=Richard|Mark&ResourceRep=Richard|Mark&Group=test&now=-3&tm_step=20&st_time=08&en_time=17&hr_height=88&hide_wkend=1&colorby=TypeColor&js=1#date=2017-05-11,mode=unit

    Is that the correct syntax? I also tried the following with the same results:

    http://…&filter_resource=Richard|Mark&ResourceRep=Richard&ResourceRep=Mark&Group=test&now=-3&tm_step=20&st_time=08&en_time=17&hr_height=88&hide_wkend=1&colorby=TypeColor&js=1#date=2017-05-11,mode=unit

    That was no better. Can you see anything wrong?

    Thanks — Mark

  • #73930

    Lauren Naslund
    Keymaster

    Hi Mark,

    – To draw the event under every resource assigned to it, use the return-delimited Resource field in the calendar’s data source.

    – For filtering, use the ResourceRep repeating field in the URL:  &ResourceRep=Richard|Mark

You must be logged in to reply to this topic.