cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

Powerapps formula on mobile

hi

 

quick question 

 

are there issues / known formulas which don't work on a mobile device.

 

I've created / creating an app which works fine when I run it from a PC but on mobile the formulas simply do nothing 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

@daniels471 

There is nothing in particular in your Formula that would have issues on mobile over desktop, but you might want to review what you are doing in the app a little bit - get rid of all the collections, reduce variables, etc.  The more complexity in your formulas, the harder they are to troubleshoot.

You can consider changing your formula to the following equivalent:

Set(varlessonname, If(varlessionID>5, "After School", Text(varlessonID)));
With({_record: {Title: 'DCV-frm-title'.Text,
            name: 'DCV-form-name'.Text,
            subject: 'dd-subject'.Selected.Value,
            'booked from': DateValue('lab-currdate'.Text),
            booked: true,
            lesson: varlessonname,
            'email address': 'DCV-form-email'.Text,
            class: 'dd-Class'.Selected.Value
            } 
     },
    Switch(varcurrentroom,
        "MS-ICT", Collect('MS-ICT', _record),
        "TrolleyA", Collect(TrolleyA, _record),
        "TrolleyB", Collect(TrolleyB, _record),
        "TrolleyC", Collect(TrolleyC, _record),                       
        "TrolleyD", Collect(TrolleyD, _record),                           
        "TrolleyE", Collect(TrolleyE, _record),                                
        "TrolleyF", Collect(TrolleyF, _record),                                     
        "KS2-laptop-1", Collect('KS2-Laptop-1', _record),                                            
        "KS3-laptop-1", Collect('KS3-laptop-1', _record),                                            
        "KS3-laptop-2", Collect('KS3-laptop-2', _record),
        "TrolleyG", Collect(TrolleyG, _record),
        "H3-ICT", Collect('H3-ICT', _record),
        "Sensory-room", Collect('Sensory-room', _record),
        "Drama", Collect('Drama Studio', _record),
        "Pool", Collect(Pool, _record),
        "Sports-Hall", Collect('sports hall', _record),
        "Blue-Room", Collect('Blue room', _record),
        "Green-Room", Collect('Green room', _record),
        "h3-Conf", Collect('H3 Conference', _record),
        "cabaret", Collect('WTS Caberet', _record),
        "board-room", Collect('WTS Board Room', _record),
        "gulkit", Collect('Gulliver Kitchen', _record),
        "gullive", Collect('Gulliver Living Room', _record),
        "lightkit", Collect('Lighthouse Kitchen', _record),
        "lightlive", Collect('Lighthouse Living Room', _record),
        "Classwatch", Collect(Classwatch, _record),
        "Outdoor-Gym", Collect('Outdoor-Gym', _record),
    )
);

Set(varlessonID, varlessonID + 1);
Select('but-book')

 

I would also consider the very specific collections as your app will constantly need to be altered as rooms or resources change.  Review the need for a collection.  If you are just using it like a variable, then use a variable.  If you are setting the collection to then patch/update back to a datasource, then consider skipping them all together. 

 

In general what I am suggesting is to simplify the design of these formulas as the more you do, the more chances for problems, not only in the app in general, but across different devices that will, in some cases, perform functions differently than expected.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

5 REPLIES 5
Super User III
Super User III

If you are referring to a particular formula and not the whole App, then show the formula.

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Helper II
Helper II

the formula which doesn't appear to be working is 

Switch(
    varlessonID,
    1,
    Set(
        varlessonname,
        "1"
    ),
    2,
    Set(
        varlessonname,
        "2"
    ),
    3,
    Set(
        varlessonname,
        "3"
    ),
    4,
    Set(
        varlessonname,
        "4"
    ),
    5,
    Set(
        varlessonname,
        "5"
    ),
    6,
    Set(
        varlessonname,
        "After School"
    )
);
With( {_title : 'DCV-frm-title'.Text,
_name: 'DCV-form-name'.Text,
            _subject: 'dd-subject'.SelectedText.Value,
            '_booked-from' : DateValue('lab-currdate'.Text),
            _booked: true,
            _lesson: varlessonname,
            _email: 'DCV-form-email'.Text,
            _class: 'dd-Class'.SelectedText.Value


},
Switch(varcurrentroom,
    "MS-ICT",
    Collect(
        'MS-ICT',
        {
            Title: _title,
            name: _name,
            subject: _subject,
            'booked from': '_booked-from',
            booked: _booked,
            lesson: _lesson,
            'email address': _email,
            class: _class
        }
    ),
     "TrolleyA",
        Collect(
            TrolleyA,
            {
                Title: _title,
                name: _name,
                subject: _subject,
                'booked from': '_booked-from',
                booked: _booked,
                lesson: _lesson,
                'email address': _email,
                class: _class
            }
        ),

           "TrolleyB",
            Collect(
                TrolleyB,
                {
                    Title: _title,
                    name:_name,
                    subject: _subject,
                    'booked from': '_booked-from',
                    booked: _booked,
                    lesson: _lesson,
                    'email address': _email,
                    class: _class
                }
            ),
           
           "TrolleyC",
            Collect(
                TrolleyC,
                {
                    Title: _title,
                    name:_name,
                    subject: _subject,
                    'booked from': '_booked-from',
                    booked: _booked,
                    lesson: _lesson,
                    'email address': _email,
                    class: _class
                }
            ),
                       
           "TrolleyD",
            Collect(
                TrolleyD,
                {
                    Title: _title,
                    name:_name,
                    subject: _subject,
                    'booked from': '_booked-from',
                    booked: _booked,
                    lesson: _lesson,
                    'email address': _email,
                    class: _class
                }
            ),
                           
           "TrolleyE",
            Collect(
                TrolleyE,
                {
                    Title: _title,
                    name:_name,
                    subject: _subject,
                    'booked from': '_booked-from',
                    booked: _booked,
                    lesson: _lesson,
                    'email address': _email,
                    class: _class
                }
            ),
                                
           "TrolleyF",
            Collect(
                TrolleyF,
                {
                    Title: _title,
                    name:_name,
                    subject: _subject,
                    'booked from': '_booked-from',
                    booked: _booked,
                    lesson: _lesson,
                    'email address': _email,
                    class: _class
                }
            ),
                                     
           "KS2-laptop-1",
            Collect(
               'KS2-Laptop-1',
                {
                    Title: _title,
                    name:_name,
                    subject: _subject,
                    'booked from': '_booked-from',
                    booked: _booked,
                    lesson: _lesson,
                    'email address': _email,
                    class: _class
                }
            ),
                                            
           "KS3-laptop-1",
            Collect(
               'KS3-laptop-1',
                {
                    Title: _title,
                    name:_name,
                    subject: _subject,
                    'booked from': '_booked-from',
                    booked: _booked,
                    lesson: _lesson,
                    'email address': _email,
                    class: _class
                }
            ),
                                            
           "KS3-laptop-2",
            Collect(
               'KS3-laptop-2',
                {
                    Title: _title,
                    name:_name,
                    subject: _subject,
                    'booked from': '_booked-from',
                    booked: _booked,
                    lesson: _lesson,
                    'email address': _email,
                    class: _class
                }
            ),
            "TrolleyG",
            Collect(
               TrolleyG,
                {
                    Title: _title,
                    name:_name,
                    subject: _subject,
                    'booked from': '_booked-from',
                    booked: _booked,
                    lesson: _lesson,
                    'email address': _email,
                    class: _class
                }
            ),
            "H3-ICT",
            Collect(
               'H3-ICT',
                {
                    Title: _title,
                    name:_name,
                    subject: _subject,
                    'booked from': '_booked-from',
                    booked: _booked,
                    lesson: _lesson,
                    'email address': _email,
                    class: _class
                }
           ),
            "Sensory-room",
            Collect(
               'Sensory-room',
                {
                    Title: _title,
                    name:_name,
                    subject: _subject,
                    'booked from': '_booked-from',
                    booked: _booked,
                    lesson: _lesson,
                    'email address': _email,
                    class: _class
                }
           ),
            "Drama",
            Collect(
               'Drama Studio',
                {
                    Title: _title,
                    name:_name,
                    subject: _subject,
                    'booked from': '_booked-from',
                    booked: _booked,
                    lesson: _lesson,
                    'email address': _email,
                    class: _class
                }
            ),
            "Pool",
            Collect(
               Pool,
                {
                    Title: _title,
                    name:_name,
                    subject: _subject,
                    'booked from': '_booked-from',
                    booked: _booked,
                    lesson: _lesson,
                    'email address': _email,
                    class: _class
                }
            ),
            "Sports-Hall",
            Collect(
               'sports hall',
                {
                    Title: _title,
                    name:_name,
                    subject: _subject,
                    'booked from': '_booked-from',
                    booked: _booked,
                    lesson: _lesson,
                    'email address': _email,
                    class: _class
                }
           ),
            "Blue-Room",
            Collect(
               'Blue room',
                {
                    Title: _title,
                    name:_name,
                    subject: _subject,
                    'booked from': '_booked-from',
                    booked: _booked,
                    lesson: _lesson,
                    'email address': _email,
                    class: _class
                }
             ),
            "Green-Room",
            Collect(
               'Green room',
                {
                    Title: _title,
                    name:_name,
                    subject: _subject,
                    'booked from': '_booked-from',
                    booked: _booked,
                    lesson: _lesson,
                    'email address': _email,
                    class: _class
                }
           ),
            "h3-Conf",
            Collect(
               'H3 Conference',
                {
                    Title: _title,
                    name:_name,
                    subject: _subject,
                    'booked from': '_booked-from',
                    booked: _booked,
                    lesson: _lesson,
                    'email address': _email,
                    class: _class
                }
          ),
            "cabaret",
            Collect(
               'WTS Caberet',
                {
                    Title: _title,
                    name:_name,
                    subject: _subject,
                    'booked from': '_booked-from',
                    booked: _booked,
                    lesson: _lesson,
                    'email address': _email,
                    class: _class
                }
           ),
            "board-room",
            Collect(
               'WTS Board Room',
                {
                    Title: _title,
                    name:_name,
                    subject: _subject,
                    'booked from': '_booked-from',
                    booked: _booked,
                    lesson: _lesson,
                    'email address': _email,
                    class: _class
                }
           ),
            "gulkit",
            Collect(
               'Gulliver Kitchen',
                {
                    Title: _title,
                    name:_name,
                    subject: _subject,
                    'booked from': '_booked-from',
                    booked: _booked,
                    lesson: _lesson,
                    'email address': _email,
                    class: _class
                }
           ),
            "gullive",
            Collect(
               'Gulliver Living Room',
                {
                    Title: _title,
                    name:_name,
                    subject: _subject,
                    'booked from': '_booked-from',
                    booked: _booked,
                    lesson: _lesson,
                    'email address': _email,
                    class: _class
                }
            ),
            "lightkit",
            Collect(
               'Lighthouse Kitchen',
                {
                    Title: _title,
                    name:_name,
                    subject: _subject,
                    'booked from': '_booked-from',
                    booked: _booked,
                    lesson: _lesson,
                    'email address': _email,
                    class: _class
                }
            ),
            "lightlive",
            Collect(
               'Lighthouse Living Room',
                {
                    Title: _title,
                    name:_name,
                    subject: _subject,
                    'booked from': '_booked-from',
                    booked: _booked,
                    lesson: _lesson,
                    'email address': _email,
                    class: _class
                }
          ),
            "Classwatch",
            Collect(
               Classwatch,
                {
                    Title: _title,
                    name:_name,
                    subject: _subject,
                    'booked from': '_booked-from',
                    booked: _booked,
                    lesson: _lesson,
                    'email address': _email,
                    class: _class
                }
           ),
            "Outdoor-Gym",
            Collect(
               'Outdoor-Gym',
                {
                    Title: _title,
                    name:_name,
                    subject: _subject,
                    'booked from': '_booked-from',
                    booked: _booked,
                    lesson: _lesson,
                    'email address': _email,
                    class: _class
                }
            )
)
);

    
                             
                                        
                                    
                                
                            

Set(
    varlessonID,
    varlessonID + 1
);
Select('but-book')

im not sure if there is something in there which isnt supported

Super User III
Super User III

@daniels471 

There is nothing in particular in your Formula that would have issues on mobile over desktop, but you might want to review what you are doing in the app a little bit - get rid of all the collections, reduce variables, etc.  The more complexity in your formulas, the harder they are to troubleshoot.

You can consider changing your formula to the following equivalent:

Set(varlessonname, If(varlessionID>5, "After School", Text(varlessonID)));
With({_record: {Title: 'DCV-frm-title'.Text,
            name: 'DCV-form-name'.Text,
            subject: 'dd-subject'.Selected.Value,
            'booked from': DateValue('lab-currdate'.Text),
            booked: true,
            lesson: varlessonname,
            'email address': 'DCV-form-email'.Text,
            class: 'dd-Class'.Selected.Value
            } 
     },
    Switch(varcurrentroom,
        "MS-ICT", Collect('MS-ICT', _record),
        "TrolleyA", Collect(TrolleyA, _record),
        "TrolleyB", Collect(TrolleyB, _record),
        "TrolleyC", Collect(TrolleyC, _record),                       
        "TrolleyD", Collect(TrolleyD, _record),                           
        "TrolleyE", Collect(TrolleyE, _record),                                
        "TrolleyF", Collect(TrolleyF, _record),                                     
        "KS2-laptop-1", Collect('KS2-Laptop-1', _record),                                            
        "KS3-laptop-1", Collect('KS3-laptop-1', _record),                                            
        "KS3-laptop-2", Collect('KS3-laptop-2', _record),
        "TrolleyG", Collect(TrolleyG, _record),
        "H3-ICT", Collect('H3-ICT', _record),
        "Sensory-room", Collect('Sensory-room', _record),
        "Drama", Collect('Drama Studio', _record),
        "Pool", Collect(Pool, _record),
        "Sports-Hall", Collect('sports hall', _record),
        "Blue-Room", Collect('Blue room', _record),
        "Green-Room", Collect('Green room', _record),
        "h3-Conf", Collect('H3 Conference', _record),
        "cabaret", Collect('WTS Caberet', _record),
        "board-room", Collect('WTS Board Room', _record),
        "gulkit", Collect('Gulliver Kitchen', _record),
        "gullive", Collect('Gulliver Living Room', _record),
        "lightkit", Collect('Lighthouse Kitchen', _record),
        "lightlive", Collect('Lighthouse Living Room', _record),
        "Classwatch", Collect(Classwatch, _record),
        "Outdoor-Gym", Collect('Outdoor-Gym', _record),
    )
);

Set(varlessonID, varlessonID + 1);
Select('but-book')

 

I would also consider the very specific collections as your app will constantly need to be altered as rooms or resources change.  Review the need for a collection.  If you are just using it like a variable, then use a variable.  If you are setting the collection to then patch/update back to a datasource, then consider skipping them all together. 

 

In general what I am suggesting is to simplify the design of these formulas as the more you do, the more chances for problems, not only in the app in general, but across different devices that will, in some cases, perform functions differently than expected.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

Helper II
Helper II

thanks for the reply , I just checked this morning and they seem to now be working on the mobile now ( I hadn't changed anything ) ideally I would like to have one list which contains all bookings with simply a Colum which says which room is booked , however I'm unsure on record limits on a SP list and also running into delegation issues with certain formulas 

Super User III
Super User III

@daniels471 

Yes, that would be the recommendation. Have a list with common columns and set a column with the room in it.

If you are running into any delegation issues or problems with record limits, please share your problems and that will give you some help and assistance. 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (43,575)