SOLVED
Home

any solution for requiring a user to first answer some questions before downloading a document ?

%3CLINGO-SUB%20id%3D%22lingo-sub-1375685%22%20slang%3D%22en-US%22%3Eany%20solution%20for%20requiring%20a%20user%20to%20first%20answer%20some%20questions%20before%20downloading%20a%20document%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1375685%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ehi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20hoping%20to%20get%20some%20help%20in%20this%20forum.%3C%2FP%3E%3CP%3EUse%20case%3A%3C%2FP%3E%3CP%3E---------%3C%2FP%3E%3CP%3EI%20have%20some%20documents%20in%20a%20sharepoint%20document%20library.%3C%2FP%3E%3CP%3E1.%20When%20my%20users%20click%20to%20download%20the%20file%2C%20I%20want%20them%20to%20first%20answer%20some%20questions%20(about%204-5%20fields)%3A%3C%2FP%3E%3CP%3Ea)%20reason%20for%26nbsp%3B%20download%2C%26nbsp%3B%3C%2FP%3E%3CP%3Eb)%20customer%3C%2FP%3E%3CP%3Ec)%20ID%3C%2FP%3E%3CP%3Ed)%20etc%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E2.%20log%20the%20download%20of%20the%20document%20(date%2C%20username)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20don't%20want%20them%20to%20%22checkout%22%20the%20document.%20They%20are%20not%20authors%2C%20but%20will%20be%20visitors%20to%20the%20sharepoint%20site.%20I%20don't%20want%20to%20enable%20access%20control%20as%20I%20don't%20want%20to%20be%20the%20bottleneck%20either%20-%20by%20needing%20me%20to%20manually%20%22approve%2Fdisapprove%22%20the%20download.%20I%20simply%20want%20the%20user%20to%20fill%20a%20survey%20of%20their%20needs%20for%20the%20document%2C%20prior%20to%20the%20download%2C.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20any%20experts%20please%20suggest%20some%20ways%20to%20enable%20this%20in%20sharepoint%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethanks.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1375685%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EPermissions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%20Online%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1376128%22%20slang%3D%22en-US%22%3ERe%3A%20any%20solution%20for%20requiring%20a%20user%20to%20first%20answer%20some%20questions%20before%20downloading%20a%20document%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1376128%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F661457%22%20target%3D%22_blank%22%3E%40user_sharept%3C%2FA%3E%26nbsp%3B%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20is%20not%20something%20SharePoint%20does%20so%20you%20would%20need%20to%20look%20at%20other%20products%20in%20Office%20365%20or%20custom%20development.%20Couple%20of%20options%3A-%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EMicrosoft%20forms%20-%20User%20has%20to%20submit%20a%20form%20to%20get%20the%20link%20(%20I%20haven't%20checked%20if%20a%20custom%20thank%20you%20message%20on%20form%20submit%20can%20contain%20a%20hyperlink).%20May%20not%20capture%20username.%3C%2FP%3E%3CP%3EPower%20Apps%20-%20you%20should%20be%20able%20to%20build%20a%20form%20that%20does%20what%20you%20want.%3C%2FP%3E%3CP%3ESharePoint%20Framework%20webpart%20-%20You%20will%20be%20able%20to%20code%20something.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20that%20helps.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1376203%22%20slang%3D%22en-US%22%3ERe%3A%20any%20solution%20for%20requiring%20a%20user%20to%20first%20answer%20some%20questions%20before%20downloading%20a%20document%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1376203%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F661457%22%20target%3D%22_blank%22%3E%40user_sharept%3C%2FA%3E%26nbsp%3B%20as%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F214649%22%20target%3D%22_blank%22%3E%40Andrew%20Hodges%3C%2FA%3E%26nbsp%3B%20has%20said%2C%20this%20cannot%20be%20done%20out%20of%20the%20box%20with%20SharePoint.%20I%20don't%20think%20the%20Forms%20approach%20will%20work%20as%20there%20is%20no%20way%20for%20forms%20to%20know%20which%20document%20to%20give%20you%20the%20link%20to.%20But%20a%20Power%20Apps%20solution%20is%20certainly%20do-able.%20For%20your%20data%20sources%20you%20would%20have%20the%20documents%20library%2C%20a%20separate%20list%20to%20hold%20the%20details%20of%20who%20downloaded%20it%20and%20the%20reason%2C%20and%20an%20Office%20365%20Users%20data%20source%20so%20the%20app%20knows%20who%20they%20are%20-%20I'm%20assuming%20that%20the%20users%20downloading%20the%20document%20are%20inside%20your%20organization.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20user%20wouldn't%20need%20to%20enter%20their%20name%20as%20the%20app%20knows%20who%20they%20are.%20But%20after%20they%20enter%20the%20customer%20and%20the%20reason%20for%20the%20download%20the%20gallery%20would%20appear%20(via%20the%20visible%20property%20on%20the%20gallery)%20with%20the%20list%20of%20documents%20and%20a%20download%20link%20for%20each%20one.%20When%20they%20click%20the%20download%20link%20the%20details%20of%20their%20request%20are%20saved%20to%20the%20separate%20list%20and%20the%20document%20opens%20in%20the%20new%20tab%20in%20the%20browser%20for%20them%20to%20download.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20could%20make%20it%20more%20intelligent%20for%20example%20by%20filtering%20the%20documents%20that%20only%20relate%20to%20a%20specific%20customer.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20Power%20App%20could%20be%20embedded%20in%20a%20SharePoint%20page%20with%20the%20Power%20Apps%20web%20part%20so%20the%20user%20is%20not%20able%20to%20do%20anything%20else%20in%20the%20library%20(like%20delete%20the%20document!).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EA%20very%20simple%20example%20(without%20the%20filter)%20is%20attached.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERob%3CBR%20%2F%3ELos%20Gallardos%3CBR%20%2F%3E%3CFONT%20size%3D%222%22%20color%3D%22%23333399%22%3EMicrosoft%20Power%20Automate%20Community%20Super%20User%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1396086%22%20slang%3D%22en-US%22%3ERe%3A%20any%20solution%20for%20requiring%20a%20user%20to%20first%20answer%20some%20questions%20before%20downloading%20a%20document%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1396086%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F174092%22%20target%3D%22_blank%22%3E%40Rob%20Elliott%3C%2FA%3Eand%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F214649%22%20target%3D%22_blank%22%3E%40Andrew%20Hodges%3C%2FA%3E%20%2C%3C%2FP%3E%3CP%3EFirst%20of%20all%2C%20thank%20you%20very%20much%20for%20the%20guidance%20and%20the%20example!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20been%20able%20to%20reproduce%20your%20mp4%20app%20on%20my%20site%20with%20some%20trial%20and%20error%20-%20haven't%20built%20any%20PowerApps%20before%2C%20so%20learning%20whats%20going%20on%20to%20took%20some%20time%2C%20but%20pausing%20your%20mp4%20and%20zooming%20in%20to%20different%20sections%20helped.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EProgress%3A%3C%2FP%3E%3CP%3E1.%20I%20have%20the%20form%20much%20as%20you%20designed%20it%2C%20displays%20the%20gallery%20after%202%20fields%20are%20entered%3C%2FP%3E%3CP%3E2.%20In%20the%20gallery%2C%20after%20some%20tweaking%20of%20the%20fields%20under%20%22Gallery1%22%2C%20I%20was%20able%20to%20display%20the%20fields%20from%20the%20sharepoint%20spreadsheet%20I%20wanted.%3C%2FP%3E%3CP%3E3.%20My%20Document%20Library%20has%20a%20column%26nbsp%3B%20%22Name%22%20for%20the%20name%20of%20the%20file%20that%20needs%20to%20be%20downloaded.%3C%2FP%3E%3CP%3E-%20(there%20are%20many%20files%20that%20are%20in%20the%20document%20library%2C%20say%20%22file1.xls%2C%20file2.xls%2C%20file3.xls)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E4.%20For%20the%20download%20icon%20that%20is%20next%20to%20the%20%22Name%22%20field%20on%20the%20Gallery1%2C%20I%20can%20specify%20explicit%20link%20to%20the%20file%20after%20copying%20it%20from%20the%20sharepoint%20site.%3C%2FP%3E%3CP%3EClicking%20on%20this%20icon%2C%20downloads%20the%20file.%20(or%20asks%20to%20-%20open%2C%20save%20%3F)%20-%20this%20is%20good.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20problem%20is%20for%20all%20the%20other%20files%20that%20show%20in%20the%20gallery%2C%20the%20link%20points%20to%20the%20same%20first%20file%20that%20I%20had%20entered%20into%20for%20the%20download%20icon%20in%20the%20appStudio%20for%20%22fx%3DDownload(%22https%2F%2F..sharepoint.com%2Ffile1.xls%22)%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20there%20a%20way%20to%20specify%20a%20reference%20to%20the%20%22Name%22%20column%20in%20the%20%22fx%22%20formula%20for%20download%20%3F%3C%2FP%3E%3CP%3EI%20tried%20many%20ways%20to%20do%20this%20with%20no%20luck.%3C%2FP%3E%3CP%3EFor%20e.g.%2C%3C%2FP%3E%3CP%3Efx%20%3D%20Download(https%3A%2F%2F....sharepoint.com%2FthisItem.Title2.value%22)%3C%2FP%3E%3CP%3E%3CSPAN%3Efx%20%3D%20Download(https%3A%2F%2F....sharepoint.com%2F%3C%2FSPAN%3Eapp.Gallery1.Title2.Value%22)%3C%2FP%3E%3CP%3Ef%3CSPAN%3Ex%20%3D%20Download(https%3A%2F%2F....sharepoint.com%2F%3C%2FSPAN%3EthisItem.Name%22)%3C%2FP%3E%3CP%3Eetc..%3C%2FP%3E%3CP%3EI%20did%20see%20documentation%20on%20%22Launch%20and%20Param%22%20but%20it%20looks%20like%20Launch%20only%20has%20option%20to%26nbsp%3B%20%22Open%22%2C%20not%20%22Save%22.%3C%2FP%3E%3CP%3EIs%20there%20a%20way%20to%20get%20Download%20to%20work%20so%20that%20I%20don't%20need%20to%20specify%20explicit%20links%20for%20each%20item%20that%20is%20read%20in%20from%20the%20document%26nbsp%3B%20library%2C%20but%20do%20it%20for%20the%20first%20item%20and%20have%20the%20same%20behavior%20be%20applied%26nbsp%3B%20to%20all%20the%20items%20in%20the%20gallery%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20again%20for%20your%20help!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%2C%3C%2FP%3E%3CP%3EHarsh%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1396788%22%20slang%3D%22en-US%22%3ERe%3A%20any%20solution%20for%20requiring%20a%20user%20to%20first%20answer%20some%20questions%20before%20downloading%20a%20document%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1396788%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F661457%22%20target%3D%22_blank%22%3E%40user_sharept%3C%2FA%3E%26nbsp%3Ba%20couple%20of%20points%20here%3A%20launch%20only%20launches%20a%20url%2C%20it%20doesn't%20have%20anything%20to%20do%20with%20save.%20To%20save%20you%20need%20to%20use%20the%20Patch%20function.%20You've%20hard-coded%20the%20File1.xls%20file%20so%20every%20download%20link%20in%20the%20gallery%20will%20open%20that%20as%20you've%20realised.%20Follow%20the%20image%20below%20and%20the%20attached%20video%20to%20select%20an%20item%20from%20your%20gallery%20and%20then%20either%20display%20it%20(with%20the%20Launch%20function)%20or%20download%20it%20(with%20the%20Download%20function).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22download.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F192346iF725AF44F6E50E84%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22download.png%22%20alt%3D%22download.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERob%3CBR%20%2F%3ELos%20Gallardos%3CBR%20%2F%3E%3CFONT%20size%3D%222%22%20color%3D%22%23006400%22%3EMicrosoft%20Power%20Automate%20Community%20Super%20User%3C%2FFONT%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1397486%22%20slang%3D%22en-US%22%3ERe%3A%20any%20solution%20for%20requiring%20a%20user%20to%20first%20answer%20some%20questions%20before%20downloading%20a%20document%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1397486%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F174092%22%20target%3D%22_blank%22%3E%40Rob%20Elliott%3C%2FA%3E%20%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20again%20for%20your%20reply.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhen%20I%20view%20my%20Document%20Library%20in%20the%20browser%2C%20it%20has%20the%20format%20shown%20below%20for%20the%20URL%26nbsp%3B%20%3A%20%26lt%3B..%26gt%3B.sharepoint.com%2Fsites%2FX%2FYCatalog%2FForms%2FAllItems.aspx%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20tried%20to%20create%20a%20powerApp%20Solution%2C%20however%20I%20think%20it%20needs%20a%20powerApp%20to%20be%20imported.%3C%2FP%3E%3CP%3ESo%2C%20basic%20question%20is%20%3A%3C%2FP%3E%3CP%3E1.%20do%20I%20have%20to%20create%20a%20power%20app%20solution%20to%20see%20the%20link%20as%20you%20have%20shown%20below%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2F...sharepoint.com%2Fsites%2Fpowerapp-solutions%2F_layouts%2Fdownload.aspx%3F..%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2F...sharepoint.com%2Fsites%2Fpowerapp-solutions%2F_layouts%2Fdownload.aspx%3F..%3C%2FA%3E.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIn%20the%20fx%20formula%2C%20I%20did%20try%20to%20modify%20my%20Document%20Library%20link%20to%26nbsp%3B%3C%2FP%3E%3CP%3Ea.%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CSPAN%3EDownload(%22https%3A%2F%2F%26lt%3B..%26gt%3B.sharepoint.com%2Fsites%2FX%2FYCatalog%2FForms%2FAllItems.aspx%3FSourceUrl%3DlblFullUrl.Text%22)%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CSPAN%3E-%20I%20was%20prompted%20-%20%22What%20do%20you%20want%20to%20do%20with%20File%20AllItems.htm%22%20with%20option%20to%20open%2Fsave%2Fcancel.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CSPAN%3Eb.%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%3CSPAN%3EDownload(%22%26lt%3B..%26gt%3B.sharepoint.com%2Fsites%2FX%2FYCatalog%2FForms%2Fdownload.aspx%3FSourceUrl%3DlblFullUrl.Text%22)%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E-%20I%20was%20prompted%20-%26nbsp%3B%3CSPAN%3E%20%22What%20do%20you%20want%20to%20do%20with%20download_aspx%3FSourceUrl%3DlblFullUrl_Text(132%20bytes)%20%3F%20with%20option%20to%20open%2Fsave%2Fcancel%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3ENeither%20of%20them%20is%20the%20filename%20-%20file1.xslx%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EWhat%20should%20I%20correct%20in%20the%20document%20library's%20link%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethank%20you%20immensely%20for%20your%20help.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%2C%3C%2FP%3E%3CP%3EHarsh%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CDIV%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1398025%22%20slang%3D%22en-US%22%3ERe%3A%20any%20solution%20for%20requiring%20a%20user%20to%20first%20answer%20some%20questions%20before%20downloading%20a%20document%20%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1398025%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F174092%22%20target%3D%22_blank%22%3E%40Rob%20Elliott%3C%2FA%3E%20%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EQuick%20update%20-%20I%20was%20able%20to%20get%20the%20download%20to%20work.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3Ethe%20actual%20fx%20I%20used%20was%3A%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EDownload(First(Split(ThisItem.'Link%20to%20item'%2C%20%22%3F%22)).Result)%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3EThanks%20a%20lot%20for%20your%20help!%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3ERegards%2C%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EHarsh%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

 

hi,

 

I am hoping to get some help in this forum.

Use case:

---------

I have some documents in a sharepoint document library.

1. When my users click to download the file, I want them to first answer some questions (about 4-5 fields):

a) reason for  download, 

b) customer

c) ID

d) etc

 

2. log the download of the document (date, username)

 

I don't want them to "checkout" the document. They are not authors, but will be visitors to the sharepoint site. I don't want to enable access control as I don't want to be the bottleneck either - by needing me to manually "approve/disapprove" the download. I simply want the user to fill a survey of their needs for the document, prior to the download,.

 

Can any experts please suggest some ways to enable this in sharepoint ?

 

thanks.

 

6 Replies
Highlighted

Hi @user_sharept ,

 

This is not something SharePoint does so you would need to look at other products in Office 365 or custom development. Couple of options:-

 

Microsoft forms - User has to submit a form to get the link ( I haven't checked if a custom thank you message on form submit can contain a hyperlink). May not capture username.

Power Apps - you should be able to build a form that does what you want.

SharePoint Framework webpart - You will be able to code something.

 

Hope that helps.

 

Highlighted
Solution

@user_sharept  as @Andrew Hodges  has said, this cannot be done out of the box with SharePoint. I don't think the Forms approach will work as there is no way for forms to know which document to give you the link to. But a Power Apps solution is certainly do-able. For your data sources you would have the documents library, a separate list to hold the details of who downloaded it and the reason, and an Office 365 Users data source so the app knows who they are - I'm assuming that the users downloading the document are inside your organization.

 

The user wouldn't need to enter their name as the app knows who they are. But after they enter the customer and the reason for the download the gallery would appear (via the visible property on the gallery) with the list of documents and a download link for each one. When they click the download link the details of their request are saved to the separate list and the document opens in the new tab in the browser for them to download.

 

You could make it more intelligent for example by filtering the documents that only relate to a specific customer. 

 

The Power App could be embedded in a SharePoint page with the Power Apps web part so the user is not able to do anything else in the library (like delete the document!).

 

A very simple example (without the filter) is attached.

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

Highlighted

@Rob Elliottand @Andrew Hodges ,

First of all, thank you very much for the guidance and the example!

 

I have been able to reproduce your mp4 app on my site with some trial and error - haven't built any PowerApps before, so learning whats going on to took some time, but pausing your mp4 and zooming in to different sections helped.

 

Progress:

1. I have the form much as you designed it, displays the gallery after 2 fields are entered

2. In the gallery, after some tweaking of the fields under "Gallery1", I was able to display the fields from the sharepoint spreadsheet I wanted.

3. My Document Library has a column  "Name" for the name of the file that needs to be downloaded.

- (there are many files that are in the document library, say "file1.xls, file2.xls, file3.xls)

 

4. For the download icon that is next to the "Name" field on the Gallery1, I can specify explicit link to the file after copying it from the sharepoint site.

Clicking on this icon, downloads the file. (or asks to - open, save ?) - this is good.

 

The problem is for all the other files that show in the gallery, the link points to the same first file that I had entered into for the download icon in the appStudio for "fx=Download("https//..sharepoint.com/file1.xls")"

 

Is there a way to specify a reference to the "Name" column in the "fx" formula for download ?

I tried many ways to do this with no luck.

For e.g.,

fx = Download(https://....sharepoint.com/thisItem.Title2.value")

fx = Download(https://....sharepoint.com/app.Gallery1.Title2.Value")

fx = Download(https://....sharepoint.com/thisItem.Name")

etc..

I did see documentation on "Launch and Param" but it looks like Launch only has option to  "Open", not "Save".

Is there a way to get Download to work so that I don't need to specify explicit links for each item that is read in from the document  library, but do it for the first item and have the same behavior be applied  to all the items in the gallery ?

 

Thanks again for your help!

 

Regards,

Harsh

 

 

 

Highlighted

@user_sharept a couple of points here: launch only launches a url, it doesn't have anything to do with save. To save you need to use the Patch function. You've hard-coded the File1.xls file so every download link in the gallery will open that as you've realised. Follow the image below and the attached video to select an item from your gallery and then either display it (with the Launch function) or download it (with the Download function).

 

download.png

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

Highlighted

 

Hi @Rob Elliott ,

 

Thanks again for your reply.

 

When I view my Document Library in the browser, it has the format shown below for the URL  : <..>.sharepoint.com/sites/X/YCatalog/Forms/AllItems.aspx

 

I tried to create a powerApp Solution, however I think it needs a powerApp to be imported.

So, basic question is :

1. do I have to create a power app solution to see the link as you have shown below ?

 

https://...sharepoint.com/sites/powerapp-solutions/_layouts/download.aspx?...

 

In the fx formula, I did try to modify my Document Library link to 

a. 

Download("https://<..>.sharepoint.com/sites/X/YCatalog/Forms/AllItems.aspx?SourceUrl=lblFullUrl.Text")

- I was prompted - "What do you want to do with File AllItems.htm" with option to open/save/cancel.

b.

Download("<..>.sharepoint.com/sites/X/YCatalog/Forms/download.aspx?SourceUrl=lblFullUrl.Text")

- I was prompted -  "What do you want to do with download_aspx?SourceUrl=lblFullUrl_Text(132 bytes) ? with option to open/save/cancel

 

Neither of them is the filename - file1.xslx

 

What should I correct in the document library's link ?

 

thank you immensely for your help.

 

Regards,

Harsh

 

 
Highlighted

Hi@Rob Elliott ,

 

Quick update - I was able to get the download to work.

 

the actual fx I used was:

 

Download(First(Split(ThisItem.'Link to item', "?")).Result)

 

Thanks a lot for your help!

 

Regards,

Harsh